[Lldb-commits] [lldb] r151034 - /lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Greg Clayton gclayton at apple.com
Mon Feb 20 21:25:28 PST 2012


Author: gclayton
Date: Mon Feb 20 23:25:28 2012
New Revision: 151034

URL: http://llvm.org/viewvc/llvm-project?rev=151034&view=rev
Log:
Fixed a crasher that would happen when supplying lldb with an application
bundle that didn't contain an executable.


Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=151034&r1=151033&r2=151034&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Mon Feb 20 23:25:28 2012
@@ -117,7 +117,7 @@
                                                  NULL, 
                                                  NULL);
         
-            if (exe_module_sp->GetObjectFile() == NULL)
+            if (error.Fail() || exe_module_sp.get() == NULL || exe_module_sp->GetObjectFile() == NULL)
             {
                 exe_module_sp.reset();
                 error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain the architecture %s",





More information about the lldb-commits mailing list