freebsd-dev/sys/gdb
Conrad Meyer a91812f69f gdb(4): Don't escape GDB special characters at application layer
In r351368, we introduced this XML- and GDB-encoded data.  The protocol
'offset' should reflex the logical XML data offset, but unfortunately we
counted the GDB escapes as well.

In fact, we cannot safely do GDB character escaping at this layer at
all, because we don't know what will be flushed in a packet.  It is
bogus to send only the first character of a two-character escape
sequence.

This patch "corrects" the problem by squashing these characters in the
transmitted XML document.  It would be nice to transmit the characters
faithfully, but that is a more complicated change.  Thread names are a
nice convenience feature for the GDB client, but one can always inspect
td_name or p_comm directly to find the true name.

Reported by:	Ka Ho Ng <khng300 AT gmail.com>
Tested by:	Ka Ho Ng
Reviewed by:	emaste, markj, rlibby
Differential Revision:	https://reviews.freebsd.org/D26599
2020-09-30 14:55:54 +00:00
..
gdb_cons.c gdb(4): Root a sysctl tree at 'debug.gdb.' 2019-09-08 22:52:47 +00:00
gdb_int.h gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
gdb_main.c gdb(4): Don't escape GDB special characters at application layer 2020-09-30 14:55:54 +00:00
gdb_packet.c gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
gdb.h gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
netgdb.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netgdb.h Implement NetGDB(4) 2019-10-17 21:33:01 +00:00