summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/arm_interface.h18
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp16
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.h2
-rw-r--r--src/core/arm/unicorn/arm_unicorn.cpp16
-rw-r--r--src/core/arm/unicorn/arm_unicorn.h1
5 files changed, 17 insertions, 36 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 26fe68a2e..b0472d55d 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -6,6 +6,8 @@
#include <array>
#include "common/common_types.h"
+#include "common/logging/log.h"
+#include "core/memory.h"
namespace Kernel {
enum class VMAPermission : u8;
@@ -142,7 +144,21 @@ public:
/// Prepare core for thread reschedule (if needed to correctly handle state)
virtual void PrepareReschedule() = 0;
- virtual void LogBacktrace() = 0;
+ void 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);
+ }
+ }
};
} // namespace Core
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp
index 47dadba91..4d2491870 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic.cpp
@@ -278,22 +278,6 @@ 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 791653233..512bf8ce9 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.h
+++ b/src/core/arm/dynarmic/arm_dynarmic.h
@@ -53,8 +53,6 @@ public:
void ClearInstructionCache() override;
void PageTableChanged() override;
- void LogBacktrace() override;
-
private:
std::unique_ptr<Dynarmic::A64::Jit> MakeJit() const;
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp
index c9495124e..c455c81fb 100644
--- a/src/core/arm/unicorn/arm_unicorn.cpp
+++ b/src/core/arm/unicorn/arm_unicorn.cpp
@@ -267,22 +267,6 @@ void ARM_Unicorn::ClearExclusiveState() {}
void ARM_Unicorn::ClearInstructionCache() {}
-void ARM_Unicorn::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);
- }
-}
-
void ARM_Unicorn::RecordBreak(GDBStub::BreakpointAddress bkpt) {
last_bkpt = bkpt;
last_bkpt_hit = true;
diff --git a/src/core/arm/unicorn/arm_unicorn.h b/src/core/arm/unicorn/arm_unicorn.h
index 41da6a73c..75761950b 100644
--- a/src/core/arm/unicorn/arm_unicorn.h
+++ b/src/core/arm/unicorn/arm_unicorn.h
@@ -40,7 +40,6 @@ public:
void ClearInstructionCache() override;
void PageTableChanged() override{};
void RecordBreak(GDBStub::BreakpointAddress bkpt);
- void LogBacktrace() override;
private:
uc_engine* uc{};