diff options
Diffstat (limited to 'src/core/arm')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 3 | ||||
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.h | 10 | ||||
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 5 | ||||
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.h | 4 |
4 files changed, 7 insertions, 15 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 4fdc12f11..49145911b 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -26,7 +26,6 @@ using Vector = Dynarmic::A64::Vector; class ARM_Dynarmic_Callbacks : public Dynarmic::A64::UserCallbacks { public: explicit ARM_Dynarmic_Callbacks(ARM_Dynarmic& parent) : parent(parent) {} - ~ARM_Dynarmic_Callbacks() = default; u8 MemoryRead8(u64 vaddr) override { return Memory::Read8(vaddr); @@ -164,7 +163,6 @@ MICROPROFILE_DEFINE(ARM_Jit_Dynarmic, "ARM JIT", "Dynarmic", MP_RGB(255, 64, 64) void ARM_Dynarmic::Run() { MICROPROFILE_SCOPE(ARM_Jit_Dynarmic); - ASSERT(Memory::GetCurrentPageTable() == current_page_table); jit->Run(); } @@ -279,7 +277,6 @@ void ARM_Dynarmic::ClearExclusiveState() { void ARM_Dynarmic::PageTableChanged() { jit = MakeJit(); - current_page_table = Memory::GetCurrentPageTable(); } DynarmicExclusiveMonitor::DynarmicExclusiveMonitor(std::size_t core_count) : monitor(core_count) {} diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index aada1e862..d867c2a50 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h @@ -12,10 +12,6 @@ #include "core/arm/exclusive_monitor.h" #include "core/arm/unicorn/arm_unicorn.h" -namespace Common { -struct PageTable; -} - namespace Core::Timing { class CoreTiming; } @@ -29,7 +25,7 @@ class ARM_Dynarmic final : public ARM_Interface { public: ARM_Dynarmic(Timing::CoreTiming& core_timing, ExclusiveMonitor& exclusive_monitor, std::size_t core_index); - ~ARM_Dynarmic(); + ~ARM_Dynarmic() override; void MapBackingMemory(VAddr address, std::size_t size, u8* memory, Kernel::VMAPermission perms) override; @@ -69,14 +65,12 @@ private: std::size_t core_index; Timing::CoreTiming& core_timing; DynarmicExclusiveMonitor& exclusive_monitor; - - Common::PageTable* current_page_table = nullptr; }; class DynarmicExclusiveMonitor final : public ExclusiveMonitor { public: explicit DynarmicExclusiveMonitor(std::size_t core_count); - ~DynarmicExclusiveMonitor(); + ~DynarmicExclusiveMonitor() override; void SetExclusive(std::size_t core_index, VAddr addr) override; void ClearExclusive() override; diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index a542a098b..27309280c 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -192,12 +192,13 @@ void ARM_Unicorn::ExecuteInstructions(int num_instructions) { CHECKED(uc_emu_start(uc, GetPC(), 1ULL << 63, 0, num_instructions)); core_timing.AddTicks(num_instructions); if (GDBStub::IsServerEnabled()) { - if (last_bkpt_hit) { + if (last_bkpt_hit && last_bkpt.type == GDBStub::BreakpointType::Execute) { uc_reg_write(uc, UC_ARM64_REG_PC, &last_bkpt.address); } + Kernel::Thread* thread = Kernel::GetCurrentThread(); SaveContext(thread->GetContext()); - if (last_bkpt_hit || GDBStub::GetCpuStepFlag()) { + if (last_bkpt_hit || GDBStub::IsMemoryBreak() || GDBStub::GetCpuStepFlag()) { last_bkpt_hit = false; GDBStub::Break(); GDBStub::SendTrap(thread, 5); diff --git a/src/core/arm/unicorn/arm_unicorn.h b/src/core/arm/unicorn/arm_unicorn.h index dbd6955ea..1e44f0736 100644 --- a/src/core/arm/unicorn/arm_unicorn.h +++ b/src/core/arm/unicorn/arm_unicorn.h @@ -18,7 +18,7 @@ namespace Core { class ARM_Unicorn final : public ARM_Interface { public: explicit ARM_Unicorn(Timing::CoreTiming& core_timing); - ~ARM_Unicorn(); + ~ARM_Unicorn() override; void MapBackingMemory(VAddr address, std::size_t size, u8* memory, Kernel::VMAPermission perms) override; @@ -50,7 +50,7 @@ private: uc_engine* uc{}; Timing::CoreTiming& core_timing; GDBStub::BreakpointAddress last_bkpt{}; - bool last_bkpt_hit; + bool last_bkpt_hit = false; }; } // namespace Core |