summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dynarmic/arm_dynarmic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm/dynarmic/arm_dynarmic.cpp')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp
index 4d2491870..47dadba91 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic.cpp
@@ -278,6 +278,22 @@ void ARM_Dynarmic::PageTableChanged() {
current_page_table = Memory::GetCurrentPageTable();
}
+void ARM_Dynarmic::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);
+ }
+}
+
DynarmicExclusiveMonitor::DynarmicExclusiveMonitor(std::size_t core_count) : monitor(core_count) {}
DynarmicExclusiveMonitor::~DynarmicExclusiveMonitor() = default;