gdb: fixed faulty response to "read registers" command.
Due to incorrect trimming of register values, we sometimes sent a reply packet which contained extra digits.
This commit is contained in:
parent
1f7808a78f
commit
b8d461b8ba
4
gdb.c
4
gdb.c
|
@ -214,7 +214,9 @@ static int read_registers(struct gdb_data *data)
|
|||
|
||||
gdb_packet_start(data);
|
||||
for (i = 0; i < DEVICE_NUM_REGS; i++)
|
||||
gdb_printf(data, "%02x%02x", regs[i] & 0xff, regs[i] >> 8);
|
||||
gdb_printf(data, "%02x%02x",
|
||||
regs[i] & 0xff,
|
||||
(regs[i] >> 8) & 0xff);
|
||||
gdb_packet_end(data);
|
||||
return gdb_flush_ack(data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue