Author: emaste
Date: Tue Aug 20 04:17:13 2013
New Revision: 188776

URL: http://llvm.org/viewvc/llvm-project?rev=188776&view=rev
Log:
Fix crash when connecting to gdbserver without loading a file first.

Patch from Abid, Hafiz.

Modified:
    
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp

Modified: 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=188776&r1=188775&r2=188776&view=diff
==============================================================================
--- 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
(original)
+++ 
lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp 
Tue Aug 20 04:17:13 2013
@@ -449,6 +449,9 @@ DynamicLoaderPOSIXDYLD::ComputeLoadOffse
         return LLDB_INVALID_ADDRESS;
 
     ModuleSP module = m_process->GetTarget().GetExecutableModule();
+    if (!module)
+        return LLDB_INVALID_ADDRESS;
+
     ObjectFile *exe = module->GetObjectFile();
     Address file_entry = exe->GetEntryPointAddress();
 


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

Reply via email to