Date: Mon, 19 Aug 2019 22:58:30 +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: r351239 - head/sys/gdb Message-ID: <201908192258.x7JMwUw5089290@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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")) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908192258.x7JMwUw5089290>