diff options
author | Pavel Labath <pavel@labath.sk> | 2025-01-31 09:07:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-31 09:07:11 +0100 |
commit | 13d0318a9848ec322ceea4f37fb6b421d70407b0 (patch) | |
tree | 10bc0882b54863e4fd0d900386885672fc75d871 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | |
parent | c242c7c13919ed273292d52fd464201105a76b53 (diff) | |
download | llvm-13d0318a9848ec322ceea4f37fb6b421d70407b0.zip llvm-13d0318a9848ec322ceea4f37fb6b421d70407b0.tar.gz llvm-13d0318a9848ec322ceea4f37fb6b421d70407b0.tar.bz2 |
[lldb] Add support for gdb-style 'x' packet (#124733)
See also
https://discourse.llvm.org/t/rfc-fixing-incompatibilties-of-the-x-packet-w-r-t-gdb/84288
and https://sourceware.org/pipermail/gdb/2025-January/051705.html
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index 898d176..1118a76 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -218,7 +218,14 @@ public: bool GetpPacketSupported(lldb::tid_t tid); - bool GetxPacketSupported(); + enum class xPacketState { + Unimplemented, + Prefixed, // Successful responses start with a 'b' character. This is the + // style used by GDB. + Bare, // No prefix, packets starts with the memory being read. This is + // LLDB's original style. + }; + xPacketState GetxPacketState(); bool GetVAttachOrWaitSupported(); @@ -541,7 +548,6 @@ protected: LazyBool m_attach_or_wait_reply = eLazyBoolCalculate; LazyBool m_prepare_for_reg_writing_reply = eLazyBoolCalculate; LazyBool m_supports_p = eLazyBoolCalculate; - LazyBool m_supports_x = eLazyBoolCalculate; LazyBool m_avoid_g_packets = eLazyBoolCalculate; LazyBool m_supports_QSaveRegisterState = eLazyBoolCalculate; LazyBool m_supports_qXfer_auxv_read = eLazyBoolCalculate; @@ -561,6 +567,7 @@ protected: LazyBool m_supports_memory_tagging = eLazyBoolCalculate; LazyBool m_supports_qSaveCore = eLazyBoolCalculate; LazyBool m_uses_native_signals = eLazyBoolCalculate; + std::optional<xPacketState> m_x_packet_state; bool m_supports_qProcessInfoPID : 1, m_supports_qfProcessInfo : 1, m_supports_qUserName : 1, m_supports_qGroupName : 1, |