summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/Src/CodeWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/DebuggerWX/Src/CodeWindow.cpp')
-rw-r--r--Source/Core/DebuggerWX/Src/CodeWindow.cpp72
1 files changed, 38 insertions, 34 deletions
diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp
index f6e37e2a41..d22c0b5f60 100644
--- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp
@@ -687,7 +687,6 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
case IDM_DEBUG_GO:
{
// [F|RES] prolly we should disable the other buttons in go mode too ...
- JumpToAddress(PC);
if (CCPU::IsStepping())
{
@@ -698,7 +697,8 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
CCPU::EnableStepping(true); // Break
Host_UpdateLogDisplay();
}
-
+ wxThread::Sleep(20);
+ JumpToAddress(PC);
Update();
}
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)
{
//PanicAlert("boo");
@@ -832,9 +802,37 @@ void CCodeWindow::SingleCPUStep()
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();
std::vector<Debugger::CallstackEntry> stack;
@@ -851,7 +849,13 @@ void CCodeWindow::Update()
{
callstack->Append(wxString::FromAscii("invalid callstack"));
}
+}
+
+void CCodeWindow::Update()
+{
+ codeview->Refresh();
+ UpdateCallstack();
UpdateButtonStates();
/* DO NOT Automatically show the current PC position when a breakpoint is hit or