gdb(4): handle single register read packets
We support bulk reads of the register set, but not reading specific registers via the 'p' packet. This is useful at least for the 'call' command in gdb. Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644
This commit is contained in:
parent
c4df8cbfde
commit
fd29833d9a
@ -755,6 +755,17 @@ gdb_trap(int type, int code)
|
||||
gdb_tx_ok();
|
||||
break;
|
||||
}
|
||||
case 'p': { /* Read register. */
|
||||
uintmax_t reg;
|
||||
if (gdb_rx_varhex(®)) {
|
||||
gdb_tx_err(EINVAL);
|
||||
break;
|
||||
}
|
||||
gdb_tx_begin(0);
|
||||
gdb_tx_reg(reg);
|
||||
gdb_tx_end();
|
||||
break;
|
||||
}
|
||||
case 'P': { /* Write register. */
|
||||
char *val;
|
||||
uintmax_t reg;
|
||||
|
Loading…
Reference in New Issue
Block a user