diff options
Diffstat (limited to 'src/core/arm/unicorn')
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.cpp | 7 | ||||
-rw-r--r-- | src/core/arm/unicorn/arm_unicorn.h | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/core/arm/unicorn/arm_unicorn.cpp b/src/core/arm/unicorn/arm_unicorn.cpp index 0393fe641..d81d1b5b0 100644 --- a/src/core/arm/unicorn/arm_unicorn.cpp +++ b/src/core/arm/unicorn/arm_unicorn.cpp @@ -63,8 +63,9 @@ static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int si return false; } -ARM_Unicorn::ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture) - : ARM_Interface{system, interrupt_handler} { +ARM_Unicorn::ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture, + std::size_t core_index) + : ARM_Interface{system, interrupt_handler}, core_index{core_index} { const auto arch = architecture == Arch::AArch32 ? UC_ARCH_ARM : UC_ARCH_ARM64; CHECKED(uc_open(arch, UC_MODE_ARM, &uc)); @@ -163,7 +164,7 @@ void ARM_Unicorn::Run() { ExecuteInstructions(std::max(4000000U, 0U)); } else { while (true) { - if (interrupt_handler.IsInterrupted()) { + if (interrupt_handlers[core_index].IsInterrupted()) { return; } ExecuteInstructions(10); diff --git a/src/core/arm/unicorn/arm_unicorn.h b/src/core/arm/unicorn/arm_unicorn.h index 0a4c087cd..e3da368de 100644 --- a/src/core/arm/unicorn/arm_unicorn.h +++ b/src/core/arm/unicorn/arm_unicorn.h @@ -11,7 +11,6 @@ namespace Core { -class CPUInterruptHandler; class System; class ARM_Unicorn final : public ARM_Interface { @@ -21,7 +20,8 @@ public: AArch64, // 64-bit ARM }; - explicit ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture); + explicit ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture, + std::size_t core_index); ~ARM_Unicorn() override; void SetPC(u64 pc) override; @@ -56,6 +56,7 @@ private: uc_engine* uc{}; GDBStub::BreakpointAddress last_bkpt{}; bool last_bkpt_hit = false; + std::size_t core_index; }; } // namespace Core |