Fix crash when connecting to gdbserver without loading a file first.

Patch from Abid, Hafiz.

llvm-svn: 188776
This commit is contained in:
Ed Maste 2013-08-20 09:17:13 +00:00
parent bdd81d76f8
commit 0584d7fc34
1 changed files with 3 additions and 0 deletions

View File

@ -449,6 +449,9 @@ DynamicLoaderPOSIXDYLD::ComputeLoadOffset()
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();