summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2017-04-20 20:06:03 -0400
committerGitHub <noreply@github.com>2017-04-20 20:06:03 -0400
commit4517231a1af9a683131806354a82d205a42ba0e3 (patch)
tree84fc4199bde47cb1c17e56b168f94d2f365436fa /Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
parent6997515ec167e5bdac03bd885c137b8efd1098e2 (diff)
parent694b10da111a86d573f8a984599a5fc3466a7897 (diff)
Merge pull request #5287 from sepalani/rso
Generate Symbols From RSO Modules added
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
index df287220df..f271c8a979 100644
--- a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp
@@ -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)
{