diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2019-08-22 00:19:14 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2019-08-22 00:19:14 +0000 |
commit | 76c8c0902cbdc87d8059d2c9bef8be390c8180ff (patch) | |
tree | 53f8aa91183c9478c64e108854c41eb01943fc52 /sys/gdb | |
parent | 821fe3d3a4ab0a2867fa05ad106bb5bc6bb5058d (diff) | |
download | src-76c8c0902cbdc87d8059d2c9bef8be390c8180ff.tar.gz src-76c8c0902cbdc87d8059d2c9bef8be390c8180ff.zip |
gdb(4): Include thread in Target Halt Reason
This saves a round trip of the gdb remote inferior attempting to find
the thread id of the halted thread.
Sponsored by: Dell EMC Isilon
Notes
Notes:
svn path=/head/; revision=351365
Diffstat (limited to 'sys/gdb')
-rw-r--r-- | sys/gdb/gdb_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c index 62c06880735e..ed1b8a245347 100644 --- a/sys/gdb/gdb_main.c +++ b/sys/gdb/gdb_main.c @@ -198,8 +198,11 @@ gdb_trap(int type, int code) /* printf("GDB: got '%s'\n", gdb_rxp); */ switch (gdb_rx_char()) { case '?': /* Last signal. */ - gdb_tx_begin('S'); + gdb_tx_begin('T'); gdb_tx_hex(gdb_cpu_signal(type, code), 2); + gdb_tx_str("thread:"); + gdb_tx_varhex((long)kdb_thread->td_tid); + gdb_tx_char(';'); gdb_tx_end(); break; case 'c': { /* Continue. */ |