summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dynarmic
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-12-03 10:13:48 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-12-03 10:13:48 +0100
commit5102c912569a29259ec26aa254d4598e81205a17 (patch)
treed7437b2cf2fd53771735a2938174a4aaaed03e4e /src/core/arm/dynarmic
parentPrint backtrace on svcBreak (diff)
downloadyuzu-5102c912569a29259ec26aa254d4598e81205a17.tar
yuzu-5102c912569a29259ec26aa254d4598e81205a17.tar.gz
yuzu-5102c912569a29259ec26aa254d4598e81205a17.tar.bz2
yuzu-5102c912569a29259ec26aa254d4598e81205a17.tar.lz
yuzu-5102c912569a29259ec26aa254d4598e81205a17.tar.xz
yuzu-5102c912569a29259ec26aa254d4598e81205a17.tar.zst
yuzu-5102c912569a29259ec26aa254d4598e81205a17.zip
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp16
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.h2
2 files changed, 18 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;
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h
index 512bf8ce9..791653233 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.h
+++ b/src/core/arm/dynarmic/arm_dynarmic.h
@@ -53,6 +53,8 @@ public:
void ClearInstructionCache() override;
void PageTableChanged() override;
+ void LogBacktrace() override;
+
private:
std::unique_ptr<Dynarmic::A64::Jit> MakeJit() const;