diff options
author | Michał Górny <mgorny@moritz.systems> | 2022-06-15 16:48:48 +0200 |
---|---|---|
committer | Michał Górny <mgorny@moritz.systems> | 2022-06-24 17:20:23 +0200 |
commit | a3422793e0643fa849ff178d87fc706c81b734b7 (patch) | |
tree | 856a9a8d85efc51ab56b94922968694474b925a2 /lldb/source/Utility/StringExtractorGDBRemote.cpp | |
parent | 3266b117147db73d1c42668c1033b59a36d8a2f3 (diff) | |
download | llvm-a3422793e0643fa849ff178d87fc706c81b734b7.zip llvm-a3422793e0643fa849ff178d87fc706c81b734b7.tar.gz llvm-a3422793e0643fa849ff178d87fc706c81b734b7.tar.bz2 |
[lldb] [llgs] Support resuming one process with PID!=current via vCont
Extend vCont function to support resuming a process with an arbitrary
PID, that could be different than the one selected via Hc (or no process
at all may be selected). Resuming more than one process simultaneously
is not supported yet.
Remove the ReadTid() method that was only used by Handle_vCont(),
and furthermore it was wrongly using m_current_process rather than
m_continue_process.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D127862
Diffstat (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp')
-rw-r--r-- | lldb/source/Utility/StringExtractorGDBRemote.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index 75fc74d..0795440 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -639,7 +639,7 @@ llvm::Optional<std::pair<lldb::pid_t, lldb::tid_t>> StringExtractorGDBRemote::GetPidTid(lldb::pid_t default_pid) { llvm::StringRef view = llvm::StringRef(m_packet).substr(m_index); size_t initial_length = view.size(); - lldb::pid_t pid = default_pid; + lldb::pid_t pid = LLDB_INVALID_PROCESS_ID; lldb::tid_t tid; if (view.consume_front("p")) { @@ -675,5 +675,5 @@ StringExtractorGDBRemote::GetPidTid(lldb::pid_t default_pid) { // update m_index m_index += initial_length - view.size(); - return {{pid, tid}}; + return {{pid != LLDB_INVALID_PROCESS_ID ? pid : default_pid, tid}}; } |