| 7446b088 | 08-Mar-2021 |
Mitchell Horne <mhorne@FreeBSD.org> |
gdb: report specific stop reason for watchpoints
The remote protocol allows for implementations to report more specific reasons for the break in execution back to the client [1]. This is entirely op
gdb: report specific stop reason for watchpoints
The remote protocol allows for implementations to report more specific reasons for the break in execution back to the client [1]. This is entirely optional, so it is only implemented for amd64, arm64, and i386 at the moment.
[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Stop-Reply-Packets.html
Reviewed by: jhb MFC after: 3 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 51 Differential Revision: https://reviews.freebsd.org/D29174
show more ...
|
| 3f3cc995 | 23-Dec-2020 |
Mitchell Horne <mhorne@FreeBSD.org> |
gdb(4): allow bulk write of registers
Add support for the remote 'G' packet. This is not widely used by gdb when 'P' is supported, but is technically required by any remote gdb stub implementation [
gdb(4): allow bulk write of registers
Add support for the remote 'G' packet. This is not widely used by gdb when 'P' is supported, but is technically required by any remote gdb stub implementation [1].
[1] https://sourceware.org/gdb/current/onlinedocs/gdb/Overview.html
Reviewed by: cem MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27644
show more ...
|
| 6310546d | 18-Oct-2019 |
Conrad Meyer <cem@FreeBSD.org> |
gdb(4): Implement support for NoAckMode
When the underlying debugport transport is reliable, GDB's additional checksums and acknowledgements are redundant. NoAckMode eliminates the the acks and all
gdb(4): Implement support for NoAckMode
When the underlying debugport transport is reliable, GDB's additional checksums and acknowledgements are redundant. NoAckMode eliminates the the acks and allows us to skip checking RX checksums. The GDB packet framing does not change, so unfortunately (valid) checksums are still included as message trailers.
The gdb(4) stub in FreeBSD advertises support for the feature in response to the client's 'qSupported' request IFF the current debugport has the gdb_dbfeatures flag GDB_DBGP_FEAT_RELIABLE set. Currently, only netgdb(4) supports this feature.
If the remote GDB client supports the feature and does not have it disabled via a GDB configuration knob, it may instruct our gdb(4) stub to enter NoAckMode. Unless and until it issues that command, we must continue to transmit acks as usual (and for now, we continue to wait until we receive them as well, even if we know the debugport is on a reliable transport).
In the kernel sources, the sense of the flag representing the state of the feature is reversed from that of the GDB command. (I.e., it is 'gdb_ackmode', not 'gdb_noackmode.') This is to avoid confusing double- negative conditions.
For reference, see: * https://sourceware.org/gdb/onlinedocs/gdb/Packet-Acknowledgment.html * https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#QStartNoAckMode
Reviewed by: jhb, markj (both earlier version) Differential Revision: https://reviews.freebsd.org/D21761
show more ...
|
| 5555afa1 | 22-Aug-2019 |
Conrad Meyer <cem@FreeBSD.org> |
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 lik
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.
show more ...
|