HomeFreeBSD

gdb(4): Implement support for NoAckMode

Description

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:

Reviewed by: jhb, markj (both earlier version)
Differential Revision: https://reviews.freebsd.org/D21761

Details

Provenance
cemAuthored on
Reviewer
jhb
Differential Revision
D21761: gdb(4): Implement support for NoAckMode
Parents
rS353701: Add an ldscript for amd64 kernel modules.
Branches
Unknown
Tags
Unknown