aboutsummaryrefslogtreecommitdiff
path: root/sys/gdb
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2021-03-08 19:04:51 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2021-04-21 13:20:33 +0000
commite21ed730a558c63594877facbd4321cdb4fd729c (patch)
tree1502064c0ac3c3c85ace0fa5d14447b2fdc66aa1 /sys/gdb
parent123578f890ee067662670832099fc9616ae3c1fc (diff)
downloadsrc-e21ed730a558c63594877facbd4321cdb4fd729c.tar.gz
src-e21ed730a558c63594877facbd4321cdb4fd729c.zip
gdb: report specific stop reason for watchpoints
The remote protocol allows for implementations to report more specific reasons for the break in execution back to the client [1]. This is entirely optional, so it is only implemented for amd64, arm64, and i386 at the moment. [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Stop-Reply-Packets.html Reviewed by: jhb Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 (cherry picked from commit 7446b0888d920124516284eaa32714d63353e2c9)
Diffstat (limited to 'sys/gdb')
-rw-r--r--sys/gdb/gdb_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c
index d0dbdfa63cb7..de68e8c476b1 100644
--- a/sys/gdb/gdb_main.c
+++ b/sys/gdb/gdb_main.c
@@ -741,8 +741,9 @@ gdb_trap(int type, int code)
gdb_tx_char(':');
gdb_tx_reg(GDB_REG_PC);
gdb_tx_char(';');
+ gdb_cpu_stop_reason(type, code);
gdb_tx_str("thread:");
- gdb_tx_varhex((long)kdb_thread->td_tid);
+ gdb_tx_varhex((uintmax_t)kdb_thread->td_tid);
gdb_tx_char(';');
gdb_tx_end(); /* XXX check error condition. */