aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorAyush Sahay <quic_asahay@quicinc.com>2024-04-25 22:30:02 +0530
committerGitHub <noreply@github.com>2024-04-25 22:30:02 +0530
commit2db782047b295730cd018b2641a16461f87ce55e (patch)
tree65646ed4610ef651f4e9ff3915ae44ea859b0e5f /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent18376810f359dbd39d2a0aa0ddfc0f7f50eac199 (diff)
downloadllvm-2db782047b295730cd018b2641a16461f87ce55e.zip
llvm-2db782047b295730cd018b2641a16461f87ce55e.tar.gz
llvm-2db782047b295730cd018b2641a16461f87ce55e.tar.bz2
[lldb] [llgs] Fix assertion in Handle_qfThreadInfo (#88301)
Currently, GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo asserts if the number of processes under debug isn’t 1 and the multiprocess feature isn’t supported. This is so that we don't string IDs of threads belonging to different processes together without including the IDs of the processes themselves in the response when there are multiple processes under debug. However, it’s conceivable that we have no process under debug and the multiprocess feature isn’t supported. So, have GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo assert if the number of processes under debug is greater than 1 and the multiprocess feature isn’t supported.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 3d37bb2..ae1a77e 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -2087,7 +2087,7 @@ void GDBRemoteCommunicationServerLLGS::AddProcessThreads(
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo(
StringExtractorGDBRemote &packet) {
- assert(m_debugged_processes.size() == 1 ||
+ assert(m_debugged_processes.size() <= 1 ||
bool(m_extensions_supported &
NativeProcessProtocol::Extension::multiprocess));