early-access version 2815

This commit is contained in:
pineappleEA
2022-07-05 04:21:48 +02:00
parent b45f33b6ff
commit c1c1aa518f
14 changed files with 255 additions and 326 deletions

View File

@@ -191,8 +191,10 @@ std::string GDBStubA64::RegRead(const Kernel::KThread* thread, size_t id) const
const auto& gprs{context.cpu_registers};
const auto& fprs{context.vector_registers};
if (id <= SP_REGISTER) {
if (id < SP_REGISTER) {
return ValueToHex(gprs[id]);
} else if (id == SP_REGISTER) {
return ValueToHex(context.sp);
} else if (id == PC_REGISTER) {
return ValueToHex(context.pc);
} else if (id == PSTATE_REGISTER) {
@@ -215,8 +217,10 @@ void GDBStubA64::RegWrite(Kernel::KThread* thread, size_t id, std::string_view v
auto& context{thread->GetContext64()};
if (id <= SP_REGISTER) {
if (id < SP_REGISTER) {
context.cpu_registers[id] = HexToValue<u64>(value);
} else if (id == SP_REGISTER) {
context.sp = HexToValue<u64>(value);
} else if (id == PC_REGISTER) {
context.pc = HexToValue<u64>(value);
} else if (id == PSTATE_REGISTER) {