Update symbol list of disassembly window when loadexec.

This commit is contained in:
shenweip 2020-09-12 19:45:25 +08:00
parent 6c9b9b54b7
commit fbea8f438d
9 changed files with 19 additions and 0 deletions

View File

@ -1743,6 +1743,8 @@ bool __KernelLoadExec(const char *filename, u32 paramPtr, std::string *error_str
return false;
}
host->NotifySymbolMapUpdated();
mipsr4k.pc = module->nm.entry_addr;
INFO_LOG(LOADER, "Module entry: %08x", mipsr4k.pc);

View File

@ -48,6 +48,7 @@ public:
virtual bool IsDebuggingEnabled() {return true;}
virtual bool AttemptLoadSymbolMap();
virtual void SaveSymbolMap() {}
virtual void NotifySymbolMapUpdated() {}
virtual void SetWindowTitle(const char *message) {}
virtual bool CanCreateShortcut() {return false;}

View File

@ -67,6 +67,9 @@ public:
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);
return g_symbolMap->LoadSymbolMap(fn.c_str());
}
virtual void NotifySymbolMapUpdated() override { g_symbolMap->SortSymbols(); }
void PrepareShutdown() {
auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart);
g_symbolMap->SaveSymbolMap(fn.c_str());

View File

@ -43,6 +43,7 @@ public:
bool IsDebuggingEnabled() override {return false;}
bool AttemptLoadSymbolMap() override {return false;}
void NotifySymbolMapUpdated() override {}
void SetWindowTitle(const char *message) override {}
void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override {

View File

@ -158,6 +158,10 @@ void UWPHost::SaveSymbolMap() {
g_symbolMap->SaveSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(), ".ppmap").c_str());
}
void UWPHost::NotifySymbolMapUpdated() {
g_symbolMap->SortSymbols();
}
bool UWPHost::IsDebuggingEnabled() {
return false;
}

View File

@ -30,6 +30,7 @@ public:
void BootDone() override;
bool AttemptLoadSymbolMap() override;
void SaveSymbolMap() override;
void NotifySymbolMapUpdated() override;
void SetWindowTitle(const char *message) override;
void ToggleDebugConsoleVisibility() override;

View File

@ -312,6 +312,11 @@ void WindowsHost::SaveSymbolMap() {
g_symbolMap->SaveSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(),".ppmap").c_str());
}
void WindowsHost::NotifySymbolMapUpdated() {
g_symbolMap->SortSymbols();
PostMessage(mainWindow_, WM_USER + 1, 0, 0);
}
bool WindowsHost::IsDebuggingEnabled() {
#ifdef _DEBUG
return true;

View File

@ -52,6 +52,7 @@ public:
void BootDone() override;
bool AttemptLoadSymbolMap() override;
void SaveSymbolMap() override;
void NotifySymbolMapUpdated() override;
void SetWindowTitle(const char *message) override;
void ToggleDebugConsoleVisibility() override;

View File

@ -44,6 +44,7 @@ public:
bool IsDebuggingEnabled() override { return false; }
bool AttemptLoadSymbolMap() override { g_symbolMap->Clear(); return false; }
void NotifySymbolMapUpdated() override {}
bool ShouldSkipUI() override { return true; }