diff options
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
| -rw-r--r-- | src/core/arm/arm_interface.cpp | 26 |
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 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "arm_interface.h" | ||
| 6 | #include "common/common_types.h" | ||
| 7 | #include "common/logging/log.h" | ||
| 8 | #include "core/memory.h" | ||
| 9 | |||
| 10 | namespace Core { | ||
| 11 | void ARM_Interface::LogBacktrace() { | ||
| 12 | VAddr fp = GetReg(29); | ||
| 13 | VAddr lr = GetReg(30); | ||
| 14 | VAddr sp = GetReg(13); | ||
| 15 | VAddr pc = GetPC(); | ||
| 16 | LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", sp, pc); | ||
| 17 | for (;;) { | ||
| 18 | LOG_ERROR(Core_ARM, "{:016X}", lr); | ||
| 19 | if (!fp) { | ||
| 20 | break; | ||
| 21 | } | ||
| 22 | lr = Memory::Read64(fp + 8) - 4; | ||
| 23 | fp = Memory::Read64(fp); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | }; // namespace Core | ||