[lldb-dev] [Bug 42471] New: GDB remote protocol 'A' packet format is not spec-compliant
lldb-dev at lists.llvm.org
Mon Jul 1 12:54:45 PDT 2019
Bug ID: 42471
Summary: GDB remote protocol 'A' packet format is not
Component: All Bugs
Assignee: lldb-dev at lists.llvm.org
Reporter: spmichaels.work at gmail.com
CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org
LLDB's GDB remote protocol implementation defines a parser for the 'A' packet
at tools/debugger/source/RNBRemote.cpp:1538 (i.e. RNBRemote::HandlePacket_A()).
This packet is used to pass an argv array to the program.
GDB's remote protocol spec defines the A packet as follows (see
Initialized argv array passed into program. arglen specifies the number of
bytes in the hex encoded byte stream arg. See gdbserver for more details.
Note that `gdbserver` does not actually implement the A packet (see
the note to "See gdbserver for more details" is moot.
LLDB's implementation assumes that 'arglen' and 'argnum' are base-10 unsigned
integers. However, the GDB remote protocol overview specifies that (see
Except where otherwise noted all numbers are represented in HEX with leading
Since the 'A' packet definition does not explicitly specify a base for arglen
and argnum, thesei should actually be base-16, not base-10 as they are now.
This would require changes to the two `strtoul()` calls on lines 1562 and 1574
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev