[Lldb-commits] [PATCH] D14952: Modify "platform connect" to connect to processes as well

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 7 10:43:28 PST 2015

tberghammer added inline comments.

Comment at: source/Commands/CommandObjectPlatform.cpp:414-419
@@ -413,1 +413,8 @@
+                platform_sp->ConnectToWaitingProcesses(m_interpreter.GetDebugger(), error);
+                if (error.Fail())
+                {
+                    result.AppendError (error.AsCString());
+                    result.SetStatus (eReturnStatusFailed);
+                }
clayborg wrote:
> So should the default Platform::ConnectToWaitingProcesses() return an error? Seems like this calls should be documented to say "only return an error if you actually tried to connect to a waiting process and that failed, and if there are no processes, return an error that has been cleared". We don't want "platform connect" to fail due to not being able to connect to a waiting process do we?
I agree that we don't want "platform connect" to fail if no process is waiting (if a process is waiting but we failed to connect then I think it should but it isn't the case with the default platform).

Currently ConnectToWaitingProcesses tries to connect to all processes what are waiting what is 0 processes for the default platform and return an error if any of them failed, but with 0 processes waiting it can't happen.


More information about the lldb-commits mailing list