From a05fbd852533e18b6809e8f6cc73c139a7ad7503 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 15 Oct 2009 15:43:51 +0000 Subject: change stack shown in ppc debugger to show LR as the last item, as well as make all values point to where the code path came from, instead of the raw stack (where it will return to) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4427 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindow.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'Source/Core/DebuggerWX/Src/CodeWindow.cpp') diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index dadc22fafb..b9bbfe65c8 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -393,18 +393,16 @@ void CCodeWindow::UpdateCallstack() std::vector stack; - if (Dolphin_Debugger::GetCallstack(stack)) + bool ret = Dolphin_Debugger::GetCallstack(stack); + + for (size_t i = 0; i < stack.size(); i++) { - for (size_t i = 0; i < stack.size(); i++) - { - int idx = callstack->Append(wxString::FromAscii(stack[i].Name.c_str())); - callstack->SetClientData(idx, (void*)(u64)stack[i].vAddress); - } + int idx = callstack->Append(wxString::FromAscii(stack[i].Name.c_str())); + callstack->SetClientData(idx, (void*)(u64)stack[i].vAddress); } - else - { + + if (!ret) callstack->Append(wxString::FromAscii("invalid callstack")); - } } void CCodeWindow::CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter) -- cgit v1.2.3