summaryrefslogtreecommitdiffstats
path: root/src/core/arm/arm_interface.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-12-29 02:55:19 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-12-29 02:55:19 +0100
commit22d4e106642ac9d6a0dabc700c4dcd47be08ff41 (patch)
tree61eaf5a2b7c296828c58a92791f7094b34285428 /src/core/arm/arm_interface.cpp
parentMoved backtrace to ArmInterface (diff)
downloadyuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar.gz
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar.bz2
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar.lz
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar.xz
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.tar.zst
yuzu-22d4e106642ac9d6a0dabc700c4dcd47be08ff41.zip
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
-rw-r--r--src/core/arm/arm_interface.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp
new file mode 100644
index 000000000..bcc812da4
--- /dev/null
+++ b/src/core/arm/arm_interface.cpp
@@ -0,0 +1,26 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "arm_interface.h"
+#include "common/common_types.h"
+#include "common/logging/log.h"
+#include "core/memory.h"
+
+namespace Core {
+void ARM_Interface::LogBacktrace() {
+ VAddr fp = GetReg(29);
+ VAddr lr = GetReg(30);
+ VAddr sp = GetReg(13);
+ VAddr pc = GetPC();
+ LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", sp, pc);
+ for (;;) {
+ LOG_ERROR(Core_ARM, "{:016X}", lr);
+ if (!fp) {
+ break;
+ }
+ lr = Memory::Read64(fp + 8) - 4;
+ fp = Memory::Read64(fp);
+ }
+}
+}; // namespace Core