Fix renaming a function from disassembly.

This commit is contained in:
Unknown W. Brackets 2014-02-11 07:45:13 -08:00
parent e9fa37b4de
commit d279dcd454
4 changed files with 9 additions and 7 deletions

View file

@ -728,7 +728,7 @@ void SymbolMap::AddLabel(const char* name, u32 address, int moduleIndex) {
}
}
void SymbolMap::SetLabelName(const char* name, u32 address) {
void SymbolMap::SetLabelName(const char* name, u32 address, bool updateImmediately) {
lock_guard guard(lock_);
auto labelInfo = activeLabels.find(address);
if (labelInfo == activeLabels.end()) {
@ -740,9 +740,11 @@ void SymbolMap::SetLabelName(const char* name, u32 address) {
strcpy(label->second.name,name);
label->second.name[127] = 0;
// Do we really need to call this here? Causes extreme startup slowdown
// as this gets called for every function identified by the function replacement code.
// UpdateActiveSymbols();
// Allow the caller to skip this as it causes extreme startup slowdown
// when this gets called for every function identified by the function replacement code.
if (updateImmediately) {
UpdateActiveSymbols();
}
}
}
}