[llvm-branch-commits] [lldb] r186036 - Don't require a pid in case the remote platform doesn't actually spawn a process for the GDB server.
Greg Clayton
gclayton at apple.com
Wed Jul 10 14:19:05 PDT 2013
Author: gclayton
Date: Wed Jul 10 16:17:39 2013
New Revision: 186036
URL: http://llvm.org/viewvc/llvm-project?rev=186036&view=rev
Log:
Don't require a pid in case the remote platform doesn't actually spawn a process for the GDB server.
Modified:
lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
Modified: lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=186036&r1=186035&r2=186036&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Wed Jul 10 16:17:39 2013
@@ -378,7 +378,7 @@ PlatformRemoteGDBServer::Attach (lldb_pr
lldb::pid_t debugserver_pid = LLDB_INVALID_PROCESS_ID;
uint16_t port = m_gdb_client.LaunchGDBserverAndGetPort(debugserver_pid);
- if (port == 0 || debugserver_pid == LLDB_INVALID_PROCESS_ID)
+ if (port == 0)
{
error.SetErrorStringWithFormat ("unable to launch a GDB server on '%s'", GetHostname ());
}
@@ -422,10 +422,9 @@ PlatformRemoteGDBServer::Attach (lldb_pr
error = process_sp->ConnectRemote (NULL, connect_url);
if (error.Success())
error = process_sp->Attach(attach_info);
- else
+ else if (debugserver_pid != LLDB_INVALID_PROCESS_ID)
{
- bool success = m_gdb_client.KillSpawnedProcess(debugserver_pid);
- printf ("success = %i\n", success);
+ m_gdb_client.KillSpawnedProcess(debugserver_pid);
}
}
}
More information about the llvm-branch-commits
mailing list