diff options
author | Michał Górny <mgorny@moritz.systems> | 2021-04-09 00:59:22 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2021-04-24 11:08:33 +0200 |
commit | 312257688eb0c09a8e6915ced2acdf0bcbbad353 (patch) | |
tree | 5629d070038092574b0522b8065d97de4335b81b /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | |
parent | a7b7e7b1877d7968414396719ce78473e8fd9755 (diff) | |
download | llvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.zip llvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.tar.gz llvm-312257688eb0c09a8e6915ced2acdf0bcbbad353.tar.bz2 |
[lldb] [Process] Introduce protocol extension support API
Introduce a NativeProcessProtocol API for indicating support for
protocol extensions and enabling them. LLGS calls
GetSupportedExtensions() method on the process factory to determine
which extensions are supported by the plugin. If the future is both
supported by the plugin and reported as supported by the client, LLGS
enables it and reports to the client as supported by the server.
The extension is enabled on the process instance by calling
SetEnabledExtensions() method. This is done after qSupported exchange
(if the debugger is attached to any process), as well as after launching
or attaching to a new inferior.
The patch adds 'fork' extension corresponding to 'fork-events+'
qSupported feature and 'vfork' extension for 'vfork-events+'. Both
features rely on 'multiprocess+' being supported as well.
Differential Revision: https://reviews.llvm.org/D100153
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h index 3b890b8..32970ae 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h @@ -103,6 +103,8 @@ protected: bool m_thread_suffix_supported = false; bool m_list_threads_in_stop_reply = false; + NativeProcessProtocol::Extension m_extensions_supported = {}; + PacketResult SendONotification(const char *buffer, uint32_t len); PacketResult SendWResponse(NativeProcessProtocol *process); @@ -264,6 +266,9 @@ private: llvm::Expected<lldb::tid_t> ReadTid(StringExtractorGDBRemote &packet, bool allow_all, lldb::pid_t default_pid); + // Call SetEnabledExtensions() with appropriate flags on the process. + void SetEnabledExtensions(NativeProcessProtocol &process); + // For GDBRemoteCommunicationServerLLGS only GDBRemoteCommunicationServerLLGS(const GDBRemoteCommunicationServerLLGS &) = delete; |