[Lldb-commits] [lldb] r137136 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Johnny Chen johnny.chen at apple.com
Tue Aug 9 11:56:45 PDT 2011


Author: johnny
Date: Tue Aug  9 13:56:45 2011
New Revision: 137136

URL: http://llvm.org/viewvc/llvm-project?rev=137136&view=rev
Log:
Fix a crash while running the test suite.  Need to check the (LogSP)log shared pointer before using it.

Modified:
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=137136&r1=137135&r2=137136&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Tue Aug  9 13:56:45 2011
@@ -451,7 +451,8 @@
             error = StartDebugserverProcess (host_port);
             if (error.Fail())
             {
-                log->Printf("failed to start debugserver process: %s", error.AsCString());
+                if (log)
+                    log->Printf("failed to start debugserver process: %s", error.AsCString());
                 return error;
             }
 
@@ -550,7 +551,8 @@
                 
             if (GetID() == LLDB_INVALID_PROCESS_ID)
             {
-                log->Printf("failed to connect to debugserver: %s", error.AsCString());
+                if (log)
+                    log->Printf("failed to connect to debugserver: %s", error.AsCString());
                 KillDebugserverProcess ();
                 return error;
             }
@@ -568,7 +570,8 @@
         }
         else
         {
-            log->Printf("failed to connect to debugserver: %s", error.AsCString());
+            if (log)
+                log->Printf("failed to connect to debugserver: %s", error.AsCString());
         }
     }
     else





More information about the lldb-commits mailing list