From 776ce5d74c1dd5a6f81a1461e2609e01ea29d1c0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 30 Dec 2018 20:43:15 -0500 Subject: arm_interface: Mark variables as const where applicable in LogBacktrace() Two of these variables have fixed values, so we can make that immediately obvious from the get-go. --- src/core/arm/arm_interface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/arm/arm_interface.cpp') diff --git a/src/core/arm/arm_interface.cpp b/src/core/arm/arm_interface.cpp index f01cc4b6e..8ab605d21 100644 --- a/src/core/arm/arm_interface.cpp +++ b/src/core/arm/arm_interface.cpp @@ -11,10 +11,11 @@ namespace Core { void ARM_Interface::LogBacktrace() { 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; -- cgit v1.2.3