summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2013-08-20 09:17:13 +0000
committerEd Maste <emaste@freebsd.org>2013-08-20 09:17:13 +0000
commit0584d7fc3492c402e69f7a426e487265938a27eb (patch)
tree592438021e54e7d89330debdd4064b40777dab6c /lldb/source/Plugins/DynamicLoader
parentbdd81d76f85cba8729f5c4711a161605085099bc (diff)
downloadbcm5719-llvm-0584d7fc3492c402e69f7a426e487265938a27eb.tar.gz
bcm5719-llvm-0584d7fc3492c402e69f7a426e487265938a27eb.zip
Fix crash when connecting to gdbserver without loading a file first.
Patch from Abid, Hafiz. llvm-svn: 188776
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader')
-rw-r--r--lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index f1275e7ecb1..91c7cd3dfca 100644
--- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -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();
OpenPOWER on IntegriCloud