The branch stable/12 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7b7138454fd3b629823728a365ebd34b6bd37212
commit 7b7138454fd3b629823728a365ebd34b6bd37212 Author: Mitchell Horne <[email protected]> AuthorDate: 2020-12-23 18:36:08 +0000 Commit: Mitchell Horne <[email protected]> CommitDate: 2021-01-04 21:00:12 +0000 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. Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. (cherry picked from commit fd29833d9a7d8355ce21743ed8c706b72ba03363) --- sys/gdb/gdb_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c index 206fee4f7566..4c16e06daecf 100644 --- a/sys/gdb/gdb_main.c +++ b/sys/gdb/gdb_main.c @@ -252,6 +252,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; _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
