From 74f966404db155d61808739bfd8a497c58a2f868 Mon Sep 17 00:00:00 2001 From: Jarek Syrylak Date: Thu, 20 Sep 2018 22:03:57 +0100 Subject: [PATCH] Correct endianness of BKPT --- src/core/gdbstub/gdbstub.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 1b04f68bf3..0ecdd9f821 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -995,7 +995,7 @@ static bool CommitBreakpoint(BreakpointType type, VAddr addr, u64 len) { breakpoint.addr = addr; breakpoint.len = len; Memory::ReadBlock(addr, breakpoint.inst.data(), breakpoint.inst.size()); - static constexpr std::array btrap{{0xd4, 0x20, 0x7d, 0x0}}; + static constexpr std::array btrap{{0x00, 0x7d, 0x20, 0xd4}}; Memory::WriteBlock(addr, btrap.data(), btrap.size()); Core::System::GetInstance().InvalidateCpuInstructionCaches(); p.insert({addr, breakpoint});