Fix GDB bug (ooops)

This commit is contained in:
vhaudiquet 2023-10-13 21:57:55 +02:00
parent c286beb1e1
commit 43d22052e5

View File

@ -261,7 +261,7 @@ void gdbstub_thread_gdb()
char data[length * 2 + 1];
for(size_t i = 0; i < length; i++)
{
uint32_t value = mem_read32(address + i);
uint32_t value = mem_read8(address + i);
snprintf(data + i * 2, 3, "%02x", value);
}
@ -283,7 +283,7 @@ void gdbstub_thread_gdb()
{
uint32_t value;
sscanf(packet + data_start + i * 2, "%02x", &value);
mem_write32(address + i, value);
mem_write8(address + i, value);
}
gdbstub_send_packet("OK", 2);