freebsd-src/sys/gdb
Conrad Meyer 5555afa14e gdb(4): Implement qXfer:threads:read
This streams out an XML document over several GDB packets describing all
threads in the system; their ids, name, and any loosely defined "extra info"
we feel like including.  For now, I have included a string version of the run
state, similar to some of the DDB logic to stringify thread state.

The benefit of supporting this in addition to the qfThreadInfo/qsThreadInfo
packing is that in this mode, the host gdb does not ask for every thread's
"qThreadExtraInfo," saving per-thread round-trips on "info threads."

To use this feature, (k)gdb needs to be built with the --with-expat option.
I would encourage enabling this option by default in our GDB port, if it is
not already.

Finally, there is another optional attribute you can specify per-thread
called a "handle."  Handles are arbitrarily long sequences of bytes,
represented in the XML as hexadecimal.  It is unclear to me how or if GDB
actually uses handles for anything.  So I have left them out.
2019-08-22 00:34:11 +00:00
..
gdb.h sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
gdb_cons.c sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
gdb_int.h gdb(4): Pack 'info threads' responses into fewer packets 2019-08-19 22:57:03 +00:00
gdb_main.c gdb(4): Implement qXfer:threads:read 2019-08-22 00:34:11 +00:00
gdb_packet.c gdb(4): Pack 'info threads' responses into fewer packets 2019-08-19 22:57:03 +00:00