summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-31 17:11:00 +0100
committerGitHub <noreply@github.com>2018-12-31 17:11:00 +0100
commitf96bb2520b9a20a2b40088a3f1be99a6e6e719b9 (patch)
tree4e3133eec6e5045321b83f0cc8f89d8e0255a096
parentMerge pull request #1967 from lioncash/thread (diff)
parentarm_interface: Make include path relative for arm_interface.h (diff)
downloadyuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.gz
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.bz2
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.lz
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.xz
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.tar.zst
yuzu-f96bb2520b9a20a2b40088a3f1be99a6e6e719b9.zip
Diffstat (limited to '')
-rw-r--r--src/core/arm/arm_interface.cpp13
-rw-r--r--src/core/arm/arm_interface.h2
2 files changed, 8 insertions, 7 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 @@
// 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/arm/arm_interface.h"
#include "core/memory.h"
namespace Core {
-void ARM_Interface::LogBacktrace() {
+void ARM_Interface::LogBacktrace() const {
VAddr fp = GetReg(29);
VAddr lr = GetReg(30);
- VAddr sp = GetReg(13);
- VAddr pc = GetPC();
+ const VAddr sp = GetReg(13);
+ const VAddr pc = GetPC();
+
LOG_ERROR(Core_ARM, "Backtrace, sp={:016X}, pc={:016X}", sp, pc);
- for (;;) {
+ while (true) {
LOG_ERROR(Core_ARM, "{:016X}", lr);
if (!fp) {
break;
@@ -23,4 +24,4 @@ void ARM_Interface::LogBacktrace() {
fp = Memory::Read64(fp);
}
}
-}; // namespace Core
+} // namespace Core
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 91d2b0f81..4dfd41b43 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -148,7 +148,7 @@ public:
/// Frame records are two words long:
/// fp+0 : pointer to previous frame record
/// fp+8 : value of lr for frame
- void LogBacktrace();
+ void LogBacktrace() const;
};
} // namespace Core