Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2019 00:19:14 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351365 - head/sys/gdb
Message-ID:  <201908220019.x7M0JEsx076392@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Thu Aug 22 00:19:14 2019
New Revision: 351365
URL: https://svnweb.freebsd.org/changeset/base/351365

Log:
  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

Modified:
  head/sys/gdb/gdb_main.c

Modified: head/sys/gdb/gdb_main.c
==============================================================================
--- head/sys/gdb/gdb_main.c	Thu Aug 22 00:02:08 2019	(r351364)
+++ head/sys/gdb/gdb_main.c	Thu Aug 22 00:19:14 2019	(r351365)
@@ -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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908220019.x7M0JEsx076392>