Skip to content

Commit 4551f53

Browse files
authored
[lldb] [debugserver] fix qLaunchSuccess error, add QErrorStringInPacketSupported (#82593)
Pavel added an extension to lldb's gdb remote serial protocol that allows the debug stub to append an error message (ascii hex encoded) after an error response packet Exx. This was added in 2017 in https://reviews.llvm.org/D34945 . lldb sends the QErrorStringInPacketSupported packet and then the remote stub may add these error strings. debugserver has two bugs in its use of extended error messages: the vAttach family would send the extended error string without checking if the mode had been enabled. And qLaunchSuccess would not properly format its error response packet (missing the hex digits, did not asciihex encode the string). There is also a bug in the HandlePacket_D (detach) packet where the error packets did not include hex digits, but this one does not append an error string. I'm adding a new RNBRemote::SendErrorPacket() and routing all error packet returns though this one method. It takes an optional second string which is the longer error message; it now handles appending it to the Exx response or not, depending on the QErrorStringInPacketSupported state. I updated all packets to send their errors via this method.
1 parent 2023a23 commit 4551f53

File tree

2 files changed

+168
-160
lines changed

2 files changed

+168
-160
lines changed

0 commit comments

Comments
 (0)