[Lldb-commits] [PATCH] D11557: [LLGS] Spawned process handling cleanup

Greg Clayton clayborg at gmail.com
Tue Jul 28 09:09:48 PDT 2015

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Fix the m_debugged_process_sp check and this is good to go.

Comment at: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:280
@@ -291,1 +279,3 @@
+    // Before we try to attach, make sure we aren't already monitoring something else.
+    if (m_debugged_process_sp)
ovyalov wrote:
> We may want to check for GetID() != LLDB_INVALID_PROCESS_ID becauseNativeProcessProtocol::Attach doesn't nullify native_process_sp if AttachToInferior fails.
> Considering how often we check something like m_debugged_process_sp && (m_debugged_process_sp->GetID () != LLDB_INVALID_PROCESS_ID)" having a separate method for this might be pretty convenient - we can do it in another CL.
Or put ask the process to validate itself with IsBeingDebugged() or some other function that verifies the process is being debugged:

if (m_debugged_process_sp && m_debugged_process_sp->IsBeingDebugged())


More information about the lldb-commits mailing list