summaryrefslogtreecommitdiff
path: root/src/citra_qt/debugger/callstack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/debugger/callstack.cpp')
-rw-r--r--src/citra_qt/debugger/callstack.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp
index 274c5cccd..9bb22ca2e 100644
--- a/src/citra_qt/debugger/callstack.cpp
+++ b/src/citra_qt/debugger/callstack.cpp
@@ -25,7 +25,7 @@ CallstackWidget::CallstackWidget(QWidget* parent): QDockWidget(parent)
25 ui.treeView->setModel(callstack_model); 25 ui.treeView->setModel(callstack_model);
26} 26}
27 27
28void CallstackWidget::OnCPUStepped() 28void CallstackWidget::OnDebugModeEntered()
29{ 29{
30 ARM_Disasm* disasm = new ARM_Disasm(); 30 ARM_Disasm* disasm = new ARM_Disasm();
31 ARM_Interface* app_core = Core::g_app_core; 31 ARM_Interface* app_core = Core::g_app_core;
@@ -33,6 +33,8 @@ void CallstackWidget::OnCPUStepped()
33 u32 sp = app_core->GetReg(13); //stack pointer 33 u32 sp = app_core->GetReg(13); //stack pointer
34 u32 ret_addr, call_addr, func_addr; 34 u32 ret_addr, call_addr, func_addr;
35 35
36 Clear();
37
36 int counter = 0; 38 int counter = 0;
37 for (u32 addr = 0x10000000; addr >= sp; addr -= 4) 39 for (u32 addr = 0x10000000; addr >= sp; addr -= 4)
38 { 40 {
@@ -71,3 +73,17 @@ void CallstackWidget::OnCPUStepped()
71 } 73 }
72 } 74 }
73} 75}
76
77void CallstackWidget::OnDebugModeLeft()
78{
79
80}
81
82void CallstackWidget::Clear()
83{
84 for (int row = 0; row < callstack_model->rowCount(); row++) {
85 for (int column = 0; column < callstack_model->columnCount(); column++) {
86 callstack_model->setItem(row, column, new QStandardItem());
87 }
88 }
89}