Author: gclayton
Date: Wed Sep 17 19:14:38 2014
New Revision: 217998

URL: http://llvm.org/viewvc/llvm-project?rev=217998&view=rev
Log:
Retry remote connection one time in case of timeout and return an error that 
specifies why debugging failed.

Modified:
    lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp

Modified: 
lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=217998&r1=217997&r2=217998&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp 
(original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp 
Wed Sep 17 19:14:38 2014
@@ -488,10 +488,16 @@ PlatformRemoteGDBServer::DebugProcess (l
                                                                 port + 
port_offset);
                         assert (connect_url_len < (int)sizeof(connect_url));
                         error = process_sp->ConnectRemote (NULL, connect_url);
+                        // Retry the connect remote one time...
+                        if (error.Fail())
+                            error = process_sp->ConnectRemote (NULL, 
connect_url);
                         if (error.Success())
                             error = process_sp->Launch(launch_info);
                         else if (debugserver_pid != LLDB_INVALID_PROCESS_ID)
+                        {
+                            printf ("error: connect remote failed (%s)\n", 
error.AsCString());
                             m_gdb_client.KillSpawnedProcess(debugserver_pid);
+                        }
                     }
                 }
             }


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to