mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-30 05:48:03 +03:00
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
This commit is contained in:
parent
23665a7b93
commit
c0c6fc9e6d
29 changed files with 546 additions and 622 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue