aboutsummaryrefslogtreecommitdiff
path: root/sys/gdb/gdb_int.h
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* gdb(4): Implement support for NoAckModeConrad Meyer2019-10-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=353702
* Implement NetGDB(4)Conrad Meyer2019-10-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetGDB(4) is a component of a system using a panic-time network stack to remotely debug crashed FreeBSD kernels over the network, instead of traditional serial interfaces. There are three pieces in the complete NetGDB system. First, a dedicated proxy server must be running to accept connections from both NetGDB and gdb(1), and pass bidirectional traffic between the two protocols. Second, the NetGDB client is activated much like ordinary 'gdb' and similarly to 'netdump' in ddb(4) after a panic. Like other debugnet(4) clients (netdump(4)), the network interface on the route to the proxy server must be online and support debugnet(4). Finally, the remote (k)gdb(1) uses 'target remote <proxy>:<port>' (like any other TCP remote) to connect to the proxy server. The NetGDB v1 protocol speaks the literal GDB remote serial protocol, and uses a 1:1 relationship between GDB packets and sequences of debugnet packets (fragmented by MTU). There is no encryption utilized to keep debugging sessions private, so this is only appropriate for local segments or trusted networks. Submitted by: John Reimer <john.reimer AT emc.com> (earlier version) Discussed some with: emaste, markj Relnotes: sure Differential Revision: https://reviews.freebsd.org/D21568 Notes: svn path=/head/; revision=353700
* gdb(4): Root a sysctl tree at 'debug.gdb.'Conrad Meyer2019-09-081-0/+4
| | | | | | | | Like debug.ddb and debug.kdb. Rename 'debug.gdbcons' to 'debug.gdb.cons,' but leave the old name as a compatibility alias. Notes: svn path=/head/; revision=352050
* gdb(4): StyleConrad Meyer2019-08-221-1/+5
| | | | | | | | | | No functional change. I was surprised to find that no sys/ header already defines the -1 EOF convention anywhere, so defined one locally. Notes: svn path=/head/; revision=351370
* gdb(4): Pack 'info threads' responses into fewer packetsConrad Meyer2019-08-191-0/+1
| | | | | | | | | | | | | | | | We suffer at least one round trip ACK latency every command / packet that GDB has to send and receive, and the response format for 'info threads' supports packing many threads IDs into a single packet, so do so. Adds and uses a new API, gdb_txbuf_has_capacity(), which checks for a certain number of bytes available in the outgoing txbuf. On an example amd64 VM, the number of RTTs to transmit this list is reduced by a factor of 110x. This is especially beneficial with recent GDB, which seems to request the list at least twice during attach. Notes: svn path=/head/; revision=351238
* sys/gdb: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326269
* Add support for gdb's memory searching capabilities to our in-kernel gdbBenno Rice2014-09-051-0/+3
| | | | | | | | | | | server. Submitted by: Daniel O'Connor <daniel.oconnor@isilon.com> Reviewed by: jhb Sponsored by: EMC Isilon Storage Division Notes: svn path=/head/; revision=271173
* add support for copying console messages to a remote gdbSam Leffler2006-03-231-0/+3
| | | | | | | Reviewed by: kan Notes: svn path=/head/; revision=157059
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139778
* Introduce the GDB debugger backend for the new KDB framework. TheMarcel Moolenaar2004-07-101-0/+109
backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support. Notes: svn path=/head/; revision=131899