svn commit: r351239 - head/sys/gdb
Conrad Meyer
cem at FreeBSD.org
Mon Aug 19 22:58:30 UTC 2019
Author: cem
Date: Mon Aug 19 22:58:30 2019
New Revision: 351239
URL: https://svnweb.freebsd.org/changeset/base/351239
Log:
gdb(4): Support "qC" query
Sometimes GDB gets confused about what the current thread is. When it does,
it asks the remote: "Who am I?"
Answer it.
Modified:
head/sys/gdb/gdb_main.c
Modified: head/sys/gdb/gdb_main.c
==============================================================================
--- head/sys/gdb/gdb_main.c Mon Aug 19 22:57:03 2019 (r351238)
+++ head/sys/gdb/gdb_main.c Mon Aug 19 22:58:30 2019 (r351239)
@@ -305,7 +305,13 @@ gdb_trap(int type, int code)
break;
}
case 'q': /* General query. */
- if (gdb_rx_equal("fThreadInfo")) {
+ if (gdb_rx_equal("C")) {
+ gdb_tx_begin('Q');
+ gdb_tx_char('C');
+ gdb_tx_varhex((long)kdb_thread->td_tid);
+ gdb_tx_end();
+ break;
+ } else if (gdb_rx_equal("fThreadInfo")) {
thr_iter = kdb_thr_first();
gdb_do_threadinfo(&thr_iter);
} else if (gdb_rx_equal("sThreadInfo")) {
More information about the svn-src-head
mailing list