Fixed bug where the RISC-V target's program counter was being excluded from the response to the ReadRegisters GDB command

This commit is contained in:
Nav
2024-12-05 23:10:04 +00:00
parent 33ed399337
commit 9f945a8d79

View File

@@ -35,7 +35,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets
Logger::info("Handling ReadRegisters packet");
try {
const auto totalRegBytes = gdbTargetDescriptor.targetRegisterDescriptorsByGdbId.size() * 4;
const auto totalRegBytes = (gdbTargetDescriptor.targetRegisterDescriptorsByGdbId.size() + 1) * 4;
auto buffer = Targets::TargetMemoryBuffer(totalRegBytes, 0x00);
auto gpRegDescriptors = Targets::TargetRegisterDescriptors{};