[Lldb-commits] [lldb] r188776 - Fix crash when connecting to gdbserver without loading a file first.
Ed Maste
emaste at freebsd.org
Tue Aug 20 02:17:13 PDT 2013
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();
More information about the lldb-commits
mailing list