mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-02 15:45:58 +00:00
Generate Symbols From RSO Modules added
This commit is contained in:
parent
e0c489d80c
commit
694b10da11
9 changed files with 969 additions and 0 deletions
|
@ -3,8 +3,10 @@
|
|||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -29,6 +31,7 @@
|
|||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Debugger/RSO.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
|
@ -202,6 +205,35 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
|||
NotifyMapLoaded();
|
||||
break;
|
||||
}
|
||||
case IDM_SCAN_RSO:
|
||||
{
|
||||
wxTextEntryDialog dialog(this, _("Enter the RSO module address:"));
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
unsigned long address;
|
||||
if (dialog.GetValue().ToULong(&address, 0) && address <= std::numeric_limits<u32>::max())
|
||||
{
|
||||
RSOChainView rso_chain;
|
||||
if (rso_chain.Load(static_cast<u32>(address)))
|
||||
{
|
||||
rso_chain.Apply(&g_symbolDB);
|
||||
// Update GUI
|
||||
NotifyMapLoaded();
|
||||
}
|
||||
else
|
||||
{
|
||||
Parent->StatusBarMessage("Failed to load RSO module at %s",
|
||||
dialog.GetValue().ToStdString().c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Parent->StatusBarMessage("Invalid RSO module address: %s",
|
||||
dialog.GetValue().ToStdString().c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IDM_LOAD_MAP_FILE:
|
||||
if (!map_exists)
|
||||
{
|
||||
|
|
|
@ -232,6 +232,7 @@ void CFrame::BindDebuggerMenuBarUpdateEvents()
|
|||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_CLEAR_SYMBOLS);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_SCAN_FUNCTIONS);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_SCAN_SIGNATURES);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_SCAN_RSO);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_LOAD_MAP_FILE);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_SAVEMAPFILE);
|
||||
Bind(wxEVT_UPDATE_UI, &WxEventUtils::OnEnableIfCoreInitialized, IDM_LOAD_MAP_FILE_AS);
|
||||
|
|
|
@ -217,6 +217,7 @@ enum
|
|||
IDM_CLEAR_SYMBOLS,
|
||||
IDM_SCAN_FUNCTIONS,
|
||||
IDM_SCAN_SIGNATURES,
|
||||
IDM_SCAN_RSO,
|
||||
IDM_LOAD_MAP_FILE,
|
||||
IDM_LOAD_MAP_FILE_AS,
|
||||
IDM_LOAD_BAD_MAP_FILE,
|
||||
|
|
|
@ -423,6 +423,8 @@ wxMenu* MainMenuBar::CreateSymbolsMenu() const
|
|||
IDM_SCAN_SIGNATURES, _("&Signature Database"),
|
||||
_("Recognise standard functions from Sys/totaldb.dsy, and use generic zz_ "
|
||||
"names for other functions."));
|
||||
generate_symbols_menu->Append(IDM_SCAN_RSO, _("&RSO Modules"),
|
||||
_("Find functions based on RSO modules (experimental)..."));
|
||||
symbols_menu->AppendSubMenu(generate_symbols_menu, _("&Generate Symbols From"));
|
||||
symbols_menu->AppendSeparator();
|
||||
symbols_menu->Append(IDM_LOAD_MAP_FILE, _("&Load Symbol Map"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue