Indent the code in the previous bug fix I did. Now there aren't braces on the same level as each other. Should have initially done this along with that commit.

This commit is contained in:
Lioncash 2013-08-31 00:39:19 -04:00
parent 199c4e0d78
commit 7ce3d846d5
1 changed files with 37 additions and 37 deletions

View File

@ -216,39 +216,39 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_COPYCODE: case IDM_COPYCODE:
{ {
char disasm[256]; char disasm[256];
debugger->disasm(selection, disasm, 256); debugger->disasm(selection, disasm, 256);
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(disasm))); wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(disasm)));
} }
break; break;
case IDM_COPYHEX: case IDM_COPYHEX:
{ {
char temp[24]; char temp[24];
sprintf(temp, "%08x", debugger->readInstruction(selection)); sprintf(temp, "%08x", debugger->readInstruction(selection));
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(temp))); wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(temp)));
} }
break; break;
case IDM_COPYFUNCTION: case IDM_COPYFUNCTION:
{ {
Symbol *symbol = symbol_db->GetSymbolFromAddr(selection); Symbol *symbol = symbol_db->GetSymbolFromAddr(selection);
if (symbol) if (symbol)
{
std::string text;
text = text + symbol->name + "\r\n";
// we got a function
u32 start = symbol->address;
u32 end = start + symbol->size;
for (u32 addr = start; addr != end; addr += 4)
{ {
char disasm[256]; std::string text;
debugger->disasm(addr, disasm, 256); text = text + symbol->name + "\r\n";
text = text + StringFromFormat("%08x: ", addr) + disasm + "\r\n"; // we got a function
u32 start = symbol->address;
u32 end = start + symbol->size;
for (u32 addr = start; addr != end; addr += 4)
{
char disasm[256];
debugger->disasm(addr, disasm, 256);
text = text + StringFromFormat("%08x: ", addr) + disasm + "\r\n";
}
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(text)));
} }
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(text)));
}
} }
break; break;
#endif #endif
@ -275,12 +275,12 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_FOLLOWBRANCH: case IDM_FOLLOWBRANCH:
{ {
u32 dest = AddrToBranch(selection); u32 dest = AddrToBranch(selection);
if (dest) if (dest)
{ {
Center(dest); Center(dest);
RaiseEvent(); RaiseEvent();
} }
} }
break; break;
@ -291,19 +291,19 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_RENAMESYMBOL: case IDM_RENAMESYMBOL:
{ {
Symbol *symbol = symbol_db->GetSymbolFromAddr(selection); Symbol *symbol = symbol_db->GetSymbolFromAddr(selection);
if (symbol) if (symbol)
{
wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"),
wxGetTextFromUserPromptStr,
StrToWxStr(symbol->name));
if (input_symbol.ShowModal() == wxID_OK)
{ {
symbol->name = WxStrToStr(input_symbol.GetValue()); wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"),
Refresh(); // Redraw to show the renamed symbol wxGetTextFromUserPromptStr,
StrToWxStr(symbol->name));
if (input_symbol.ShowModal() == wxID_OK)
{
symbol->name = WxStrToStr(input_symbol.GetValue());
Refresh(); // Redraw to show the renamed symbol
}
Host_NotifyMapLoaded();
} }
Host_NotifyMapLoaded();
}
} }
break; break;