summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/src/CodeView.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-24 18:50:51 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-24 18:50:51 +0000
commitc0c6fc9e6daa10a5a30e4dfb3444d29a0baf482c (patch)
tree3d54352ddf3fdefb3a4e16fc65d73e609d296e97 /Source/Core/DebuggerWX/src/CodeView.cpp
parent23665a7b9366a567357ebaaec7ebf73a6735da8b (diff)
Ok, part 2/2 of the symbol code rewrite. You can now create and use function signature files. A monkey ball signature file included. Now to add some cooler features...
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@294 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/src/CodeView.cpp')
-rw-r--r--Source/Core/DebuggerWX/src/CodeView.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/Source/Core/DebuggerWX/src/CodeView.cpp b/Source/Core/DebuggerWX/src/CodeView.cpp
index 3edc50be01..cb2a76a6e7 100644
--- a/Source/Core/DebuggerWX/src/CodeView.cpp
+++ b/Source/Core/DebuggerWX/src/CodeView.cpp
@@ -17,7 +17,7 @@
#include "Debugger.h"
#include "Debugger/PPCDebugInterface.h"
-#include "Debugger/Debugger_SymbolMap.h"
+#include "PowerPC/SymbolDB.h"
#include "Common.h"
#include "StringUtil.h"
@@ -184,13 +184,13 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
break;
case IDM_COPYFUNCTION:
{
- int sel = Debugger::FindSymbol(selection);
- if (sel > 0) {
+ Symbol *symbol = g_symbolDB.GetSymbolFromAddr(selection);
+ if (symbol) {
std::string text;
- text = text + Debugger::GetSymbol(sel).GetName() + "\r\n";
+ text = text + symbol->name + "\r\n";
// we got a function
- u32 start = Debugger::GetSymbol(sel).vaddress;
- u32 end = start + Debugger::GetSymbol(sel).size;
+ u32 start = symbol->address;
+ u32 end = start + symbol->size;
for (u32 addr = start; addr != end; addr += 4) {
text = text + StringFromFormat("%08x: ", addr) + debugger->disasm(addr) + "\r\n";
}
@@ -217,11 +217,12 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_RENAMESYMBOL:
{
- int sel = Debugger::FindSymbol(selection);
- if (sel > 0) {
- wxTextEntryDialog input_symbol(this, wxString::FromAscii("Rename symbol:"), wxGetTextFromUserPromptStr, wxString::FromAscii(Debugger::GetSymbol(sel).GetName().c_str()));
+ Symbol *symbol = g_symbolDB.GetSymbolFromAddr(selection);
+ if (symbol) {
+ wxTextEntryDialog input_symbol(this, wxString::FromAscii("Rename symbol:"), wxGetTextFromUserPromptStr,
+ wxString::FromAscii(symbol->name.c_str()));
if (input_symbol.ShowModal() == wxID_OK) {
- Debugger::AccessSymbol(sel).SetName(input_symbol.GetValue().mb_str());
+ symbol->name = input_symbol.GetValue().mb_str();
}
// redraw();
Host_NotifyMapLoaded();