diff options
author | Michał Górny <mgorny@moritz.systems> | 2021-04-11 11:37:36 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2021-04-13 18:53:32 +0200 |
commit | f1812a284f28e5b142e63d5deeb340be3ca5d4b3 (patch) | |
tree | c37dd9e133b6ac720f0de9f0e35d0388a3ea3e5f /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | |
parent | 8a5af9e28443ce8290388439f9e36cf2727d7761 (diff) | |
download | llvm-f1812a284f28e5b142e63d5deeb340be3ca5d4b3.zip llvm-f1812a284f28e5b142e63d5deeb340be3ca5d4b3.tar.gz llvm-f1812a284f28e5b142e63d5deeb340be3ca5d4b3.tar.bz2 |
[lldb] [gdb-remote server] Abstract away getting current process
Introduce new m_current_process and m_continue_process variables that
keep the pointers to currently selected process. At this moment, this
is equivalent to m_debugged_process_up but it lays foundations for
the future multiprocess support.
Differential Revision: https://reviews.llvm.org/D100256
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h index de7ba68..f58d72e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h @@ -86,6 +86,8 @@ protected: const NativeProcessProtocol::Factory &m_process_factory; lldb::tid_t m_current_tid = LLDB_INVALID_THREAD_ID; lldb::tid_t m_continue_tid = LLDB_INVALID_THREAD_ID; + NativeProcessProtocol *m_current_process; + NativeProcessProtocol *m_continue_process; std::recursive_mutex m_debugged_process_mutex; std::unique_ptr<NativeProcessProtocol> m_debugged_process_up; @@ -254,7 +256,7 @@ private: // In any case, the function assumes that exactly one inferior is being // debugged and rejects pid values that do no match that inferior. llvm::Expected<lldb::tid_t> ReadTid(StringExtractorGDBRemote &packet, - bool allow_all = false); + bool allow_all, lldb::pid_t default_pid); // For GDBRemoteCommunicationServerLLGS only GDBRemoteCommunicationServerLLGS(const GDBRemoteCommunicationServerLLGS &) = |