diff options
| author | 2018-12-31 11:11:00 -0500 | |
|---|---|---|
| committer | 2018-12-31 11:11:00 -0500 | |
| commit | f96bb2520b9a20a2b40088a3f1be99a6e6e719b9 (patch) | |
| tree | 4e3133eec6e5045321b83f0cc8f89d8e0255a096 /src/core/arm/arm_interface.cpp | |
| parent | Merge pull request #1967 from lioncash/thread (diff) | |
| parent | arm_interface: Make include path relative for arm_interface.h (diff) | |
| download | yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.gz yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.xz yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.zip | |
Merge pull request #1966 from lioncash/backtrace
arm_interface: Minor cleanup
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
| -rw-r--r-- | src/core/arm/arm_interface.cpp | 13 |
1 files changed, 7 insertions, 6 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 | ||
| 10 | namespace Core { | 10 | namespace Core { |
| 11 | void ARM_Interface::LogBacktrace() { | 11 | void 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 |