From b71130e6f1b8eec2ee7b38214f5fa15cc2a5be96 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 1 Jun 2022 20:31:24 -0400 Subject: gdbstub: fix target descriptions --- src/core/debugger/gdbstub_arch.cpp | 93 ++++++++++++++++++++++++++++++++++---- src/core/debugger/gdbstub_arch.h | 4 +- 2 files changed, 87 insertions(+), 10 deletions(-) (limited to 'src/core') diff --git a/src/core/debugger/gdbstub_arch.cpp b/src/core/debugger/gdbstub_arch.cpp index 99e3893a9..750c353b9 100644 --- a/src/core/debugger/gdbstub_arch.cpp +++ b/src/core/debugger/gdbstub_arch.cpp @@ -46,6 +46,7 @@ std::string GDBStubA64::GetTargetXML() const { R"( + aarch64 @@ -80,7 +81,7 @@ std::string GDBStubA64::GetTargetXML() const { - + @@ -97,9 +98,84 @@ std::string GDBStubA64::GetTargetXML() const { - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )"; @@ -121,12 +197,12 @@ std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const return ValueToHex(context.pc); } else if (id == PSTATE_REGISTER) { return ValueToHex(context.pstate); - } else if (id >= Q0_REGISTER && id < FPCR_REGISTER) { + } else if (id >= Q0_REGISTER && id < FPSR_REGISTER) { return ValueToHex(fprs[id - Q0_REGISTER]); - } else if (id == FPCR_REGISTER) { - return ValueToHex(context.fpcr); } else if (id == FPSR_REGISTER) { return ValueToHex(context.fpsr); + } else if (id == FPCR_REGISTER) { + return ValueToHex(context.fpcr); } else { return ""; } @@ -145,12 +221,12 @@ void GDBStubA64::RegWrite(Kernel::KThread* thread, size_t id, std::string_view v context.pc = HexToValue(value); } else if (id == PSTATE_REGISTER) { context.pstate = HexToValue(value); - } else if (id >= Q0_REGISTER && id < FPCR_REGISTER) { + } else if (id >= Q0_REGISTER && id < FPSR_REGISTER) { context.vector_registers[id - Q0_REGISTER] = HexToValue(value); - } else if (id == FPCR_REGISTER) { - context.fpcr = HexToValue(value); } else if (id == FPSR_REGISTER) { context.fpsr = HexToValue(value); + } else if (id == FPCR_REGISTER) { + context.fpcr = HexToValue(value); } } @@ -195,6 +271,7 @@ std::string GDBStubA32::GetTargetXML() const { R"( + arm diff --git a/src/core/debugger/gdbstub_arch.h b/src/core/debugger/gdbstub_arch.h index e943848e5..4d039a9f7 100644 --- a/src/core/debugger/gdbstub_arch.h +++ b/src/core/debugger/gdbstub_arch.h @@ -40,8 +40,8 @@ private: static constexpr u32 PC_REGISTER = 32; static constexpr u32 PSTATE_REGISTER = 33; static constexpr u32 Q0_REGISTER = 34; - static constexpr u32 FPCR_REGISTER = 66; - static constexpr u32 FPSR_REGISTER = 67; + static constexpr u32 FPSR_REGISTER = 66; + static constexpr u32 FPCR_REGISTER = 67; }; class GDBStubA32 final : public GDBStubArch { -- cgit v1.2.3