diff options
author | Lioncash <mathew1800@gmail.com> | 2015-12-30 00:03:08 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2015-12-30 00:03:08 +0100 |
commit | cee8df6ff018ea6a851f012fa1c0eea758c758b0 (patch) | |
tree | 8fa1c00d82331054c4c6d4d0a331faec196efff9 /src/citra_qt/debugger | |
parent | Merge pull request #1300 from Subv/arbitrateaddress (diff) | |
download | yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar.gz yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar.bz2 yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar.lz yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar.xz yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.tar.zst yuzu-cee8df6ff018ea6a851f012fa1c0eea758c758b0.zip |
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r-- | src/citra_qt/debugger/callstack.cpp | 12 | ||||
-rw-r--r-- | src/citra_qt/debugger/registers.cpp | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp index d45eed179..793944639 100644 --- a/src/citra_qt/debugger/callstack.cpp +++ b/src/citra_qt/debugger/callstack.cpp @@ -29,18 +29,16 @@ CallstackWidget::CallstackWidget(QWidget* parent): QDockWidget(parent) void CallstackWidget::OnDebugModeEntered() { - ARM_Interface* app_core = Core::g_app_core; - - u32 sp = app_core->GetReg(13); //stack pointer - u32 ret_addr, call_addr, func_addr; + // Stack pointer + const u32 sp = Core::g_app_core->GetReg(13); Clear(); int counter = 0; for (u32 addr = 0x10000000; addr >= sp; addr -= 4) { - ret_addr = Memory::Read32(addr); - call_addr = ret_addr - 4; //get call address??? + const u32 ret_addr = Memory::Read32(addr); + const u32 call_addr = ret_addr - 4; //get call address??? if (Memory::GetPointer(call_addr) == nullptr) break; @@ -60,7 +58,7 @@ void CallstackWidget::OnDebugModeEntered() // Pre-compute the left-shift and the prefetch offset i_offset <<= 2; i_offset += 8; - func_addr = call_addr + i_offset; + const u32 func_addr = call_addr + i_offset; callstack_model->setItem(counter, 0, new QStandardItem(QString("0x%1").arg(addr, 8, 16, QLatin1Char('0')))); callstack_model->setItem(counter, 1, new QStandardItem(QString("0x%1").arg(ret_addr, 8, 16, QLatin1Char('0')))); diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp index 6100d67c5..1bd0bfebc 100644 --- a/src/citra_qt/debugger/registers.cpp +++ b/src/citra_qt/debugger/registers.cpp @@ -59,16 +59,14 @@ RegistersWidget::RegistersWidget(QWidget* parent) : QDockWidget(parent) { } void RegistersWidget::OnDebugModeEntered() { - ARM_Interface* app_core = Core::g_app_core; - - if (app_core == nullptr) + if (!Core::g_app_core) return; for (int i = 0; i < core_registers->childCount(); ++i) - core_registers->child(i)->setText(1, QString("0x%1").arg(app_core->GetReg(i), 8, 16, QLatin1Char('0'))); + core_registers->child(i)->setText(1, QString("0x%1").arg(Core::g_app_core->GetReg(i), 8, 16, QLatin1Char('0'))); for (int i = 0; i < vfp_registers->childCount(); ++i) - vfp_registers->child(i)->setText(1, QString("0x%1").arg(app_core->GetVFPReg(i), 8, 16, QLatin1Char('0'))); + vfp_registers->child(i)->setText(1, QString("0x%1").arg(Core::g_app_core->GetVFPReg(i), 8, 16, QLatin1Char('0'))); UpdateCPSRValues(); UpdateVFPSystemRegisterValues(); |