mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 16:29:21 +01:00
Hopefully make the callstack more accurate
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2398 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
042034f199
commit
541a10b2fc
@ -687,7 +687,6 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
|||||||
case IDM_DEBUG_GO:
|
case IDM_DEBUG_GO:
|
||||||
{
|
{
|
||||||
// [F|RES] prolly we should disable the other buttons in go mode too ...
|
// [F|RES] prolly we should disable the other buttons in go mode too ...
|
||||||
JumpToAddress(PC);
|
|
||||||
|
|
||||||
if (CCPU::IsStepping())
|
if (CCPU::IsStepping())
|
||||||
{
|
{
|
||||||
@ -698,7 +697,8 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
|||||||
CCPU::EnableStepping(true); // Break
|
CCPU::EnableStepping(true); // Break
|
||||||
Host_UpdateLogDisplay();
|
Host_UpdateLogDisplay();
|
||||||
}
|
}
|
||||||
|
wxThread::Sleep(20);
|
||||||
|
JumpToAddress(PC);
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -737,36 +737,6 @@ void CCodeWindow::JumpToAddress(u32 _Address)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::UpdateLists()
|
|
||||||
{
|
|
||||||
callers->Clear();
|
|
||||||
u32 addr = codeview->GetSelection();
|
|
||||||
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(addr);
|
|
||||||
if (!symbol)
|
|
||||||
return;
|
|
||||||
for (int i = 0; i < (int)symbol->callers.size(); i++)
|
|
||||||
{
|
|
||||||
u32 caller_addr = symbol->callers[i].callAddress;
|
|
||||||
Symbol *caller_symbol = g_symbolDB.GetSymbolFromAddr(caller_addr);
|
|
||||||
if (caller_symbol) {
|
|
||||||
int idx = callers->Append(wxString::Format( wxT("< %s (%08x)"), caller_symbol->name.c_str(), caller_addr));
|
|
||||||
callers->SetClientData(idx, (void*)caller_addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
calls->Clear();
|
|
||||||
for (int i = 0; i < (int)symbol->calls.size(); i++)
|
|
||||||
{
|
|
||||||
u32 call_addr = symbol->calls[i].function;
|
|
||||||
Symbol *call_symbol = g_symbolDB.GetSymbolFromAddr(call_addr);
|
|
||||||
if (call_symbol) {
|
|
||||||
int idx = calls->Append(wxString::Format(_T("> %s (%08x)"), call_symbol->name.c_str(), call_addr));
|
|
||||||
calls->SetClientData(idx, (void*)call_addr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CCodeWindow::OnCodeViewChange(wxCommandEvent &event)
|
void CCodeWindow::OnCodeViewChange(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
//PanicAlert("boo");
|
//PanicAlert("boo");
|
||||||
@ -832,9 +802,37 @@ void CCodeWindow::SingleCPUStep()
|
|||||||
Host_UpdateLogDisplay();
|
Host_UpdateLogDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCodeWindow::Update()
|
void CCodeWindow::UpdateLists()
|
||||||
|
{
|
||||||
|
callers->Clear();
|
||||||
|
u32 addr = codeview->GetSelection();
|
||||||
|
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(addr);
|
||||||
|
if (!symbol)
|
||||||
|
return;
|
||||||
|
for (int i = 0; i < (int)symbol->callers.size(); i++)
|
||||||
|
{
|
||||||
|
u32 caller_addr = symbol->callers[i].callAddress;
|
||||||
|
Symbol *caller_symbol = g_symbolDB.GetSymbolFromAddr(caller_addr);
|
||||||
|
if (caller_symbol) {
|
||||||
|
int idx = callers->Append(wxString::Format( wxT("< %s (%08x)"), caller_symbol->name.c_str(), caller_addr));
|
||||||
|
callers->SetClientData(idx, (void*)caller_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
calls->Clear();
|
||||||
|
for (int i = 0; i < (int)symbol->calls.size(); i++)
|
||||||
|
{
|
||||||
|
u32 call_addr = symbol->calls[i].function;
|
||||||
|
Symbol *call_symbol = g_symbolDB.GetSymbolFromAddr(call_addr);
|
||||||
|
if (call_symbol) {
|
||||||
|
int idx = calls->Append(wxString::Format(_T("> %s (%08x)"), call_symbol->name.c_str(), call_addr));
|
||||||
|
calls->SetClientData(idx, (void*)call_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::UpdateCallstack()
|
||||||
{
|
{
|
||||||
codeview->Refresh();
|
|
||||||
callstack->Clear();
|
callstack->Clear();
|
||||||
|
|
||||||
std::vector<Debugger::CallstackEntry> stack;
|
std::vector<Debugger::CallstackEntry> stack;
|
||||||
@ -851,7 +849,13 @@ void CCodeWindow::Update()
|
|||||||
{
|
{
|
||||||
callstack->Append(wxString::FromAscii("invalid callstack"));
|
callstack->Append(wxString::FromAscii("invalid callstack"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCodeWindow::Update()
|
||||||
|
{
|
||||||
|
codeview->Refresh();
|
||||||
|
|
||||||
|
UpdateCallstack();
|
||||||
UpdateButtonStates();
|
UpdateButtonStates();
|
||||||
|
|
||||||
/* DO NOT Automatically show the current PC position when a breakpoint is hit or
|
/* DO NOT Automatically show the current PC position when a breakpoint is hit or
|
||||||
|
@ -214,6 +214,7 @@ class CCodeWindow
|
|||||||
|
|
||||||
void UpdateButtonStates();
|
void UpdateButtonStates();
|
||||||
void UpdateLists();
|
void UpdateLists();
|
||||||
|
void UpdateCallstack();
|
||||||
void RecreateToolbar();
|
void RecreateToolbar();
|
||||||
void PopulateToolbar(wxToolBar* toolBar);
|
void PopulateToolbar(wxToolBar* toolBar);
|
||||||
void OnStatusBar(wxMenuEvent& event); void OnStatusBar_(wxUpdateUIEvent& event);
|
void OnStatusBar(wxMenuEvent& event); void OnStatusBar_(wxUpdateUIEvent& event);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user