summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/arm/arm_interface.cpp13
-rw-r--r--src/core/arm/arm_interface.h2
2 files changed, 8 insertions, 7 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
index bcc812da4..2223cbeed 100644
--- a/src/core/arm/arm_interface.cpp
+++ b/src/core/arm/arm_interface.cpp
@@ -2,19 +2,20 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "arm_interface.h"
6#include "common/common_types.h" 5#include "common/common_types.h"
7#include "common/logging/log.h" 6#include "common/logging/log.h"
7#include "core/arm/arm_interface.h"
8#include "core/memory.h" 8#include "core/memory.h"
9 9
10namespace Core { 10namespace Core {
11void ARM_Interface::LogBacktrace() { 11void ARM_Interface::LogBacktrace() const {
12 VAddr fp = GetReg(29); 12 VAddr fp = GetReg(29);
13 VAddr lr = GetReg(30); 13 VAddr lr = GetReg(30);
14 VAddr sp = GetReg(13); 14 const VAddr sp = GetReg(13);
15 VAddr pc = GetPC(); 15 const VAddr pc = GetPC();
16
16 LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", sp, pc); 17 LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", sp, pc);
17 for (;;) { 18 while (true) {
18 LOG_ERROR(Core_ARM, "{:016X}", lr); 19 LOG_ERROR(Core_ARM, "{:016X}", lr);
19 if (!fp) { 20 if (!fp) {
20 break; 21 break;
@@ -23,4 +24,4 @@ void ARM_Interface::LogBacktrace() {
23 fp = Memory::Read64(fp); 24 fp = Memory::Read64(fp);
24 } 25 }
25} 26}
26}; // namespace Core 27} // namespace Core
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 91d2b0f81..4dfd41b43 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -148,7 +148,7 @@ public:
148 /// Frame records are two words long: 148 /// Frame records are two words long:
149 /// fp+0 : pointer to previous frame record 149 /// fp+0 : pointer to previous frame record
150 /// fp+8 : value of lr for frame 150 /// fp+8 : value of lr for frame
151 void LogBacktrace(); 151 void LogBacktrace() const;
152}; 152};
153 153
154} // namespace Core 154} // namespace Core