mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-10 00:05:07 +00:00
Fix renaming a function from disassembly.
This commit is contained in:
parent
e9fa37b4de
commit
d279dcd454
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
|
||||
void AddLabel(const char* name, u32 address, int moduleIndex = -1);
|
||||
std::string GetLabelString(u32 address) const;
|
||||
void SetLabelName(const char* name, u32 address);
|
||||
void SetLabelName(const char* name, u32 address, bool updateImmediately = true);
|
||||
bool GetLabelValue(const char* name, u32& dest);
|
||||
|
||||
void AddData(u32 address, u32 size, DataType type, int moduleIndex = -1);
|
||||
|
@ -641,7 +641,7 @@ skip:
|
||||
char defaultLabel[256];
|
||||
// If it was renamed, keep it. Only change the name if it's still the default.
|
||||
if (existingLabel.empty() || !strcmp(existingLabel.c_str(), DefaultFunctionName(defaultLabel, f.start))) {
|
||||
symbolMap.SetLabelName(mf->name, f.start);
|
||||
symbolMap.SetLabelName(mf->name, f.start, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ unsigned int WINAPI TheThread(void *)
|
||||
}
|
||||
|
||||
NativeInitGraphics();
|
||||
NativeResized();
|
||||
NativeResized();
|
||||
|
||||
INFO_LOG(BOOT, "Done.");
|
||||
_dbg_update_();
|
||||
|
Loading…
x
Reference in New Issue
Block a user