[all-commits] [llvm/llvm-project] 4551f5: [lldb] [debugserver] fix qLaunchSuccess error, add...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu Feb 29 20:22:24 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4551f53523074cd4e2f93a6f79313ca2cdcc40d2
      https://github.com/llvm/llvm-project/commit/4551f53523074cd4e2f93a6f79313ca2cdcc40d2
  Author: Jason Molenda <jmolenda at apple.com>
  Date:   2024-02-29 (Thu, 29 Feb 2024)

  Changed paths:
    M lldb/tools/debugserver/source/RNBRemote.cpp
    M lldb/tools/debugserver/source/RNBRemote.h

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list