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-03-30 14:36:41 +0000
commit7446b0888d920124516284eaa32714d63353e2c9 (patch)
tree32b9a5968a153dfd30ec117d013c171699204dbf /sys/gdb
parent4beb385813c8b1014f8250a31b07fdc09a059713 (diff)
downloadsrc-7446b0888d920124516284eaa32714d63353e2c9.tar.gz
src-7446b0888d920124516284eaa32714d63353e2c9.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 MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 Differential Revision: https://reviews.freebsd.org/D29174
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 a4469fdf4997..c5e4ba608f29 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. */