diff options
author | Jim Ingham <jingham@apple.com> | 2016-01-29 20:21:33 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-01-29 20:21:33 +0000 |
commit | cbff63adb44d9253f1e304896c97130a0b78efca (patch) | |
tree | b74723607c4b70640e76ad80453cf01d03878a77 /lldb/source/Core/Address.cpp | |
parent | 66fff73c765785a775dda676cc4e76e024686754 (diff) | |
download | bcm5719-llvm-cbff63adb44d9253f1e304896c97130a0b78efca.tar.gz bcm5719-llvm-cbff63adb44d9253f1e304896c97130a0b78efca.zip |
Fixed a couple of places where we were getting the module from a
section and using it w/o checking that it was valid. This can
cause crashes - usually when tearing down a target.
llvm-svn: 259237
Diffstat (limited to 'lldb/source/Core/Address.cpp')
-rw-r--r-- | lldb/source/Core/Address.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index 83100dea93b..a12d651bdf6 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -442,7 +442,11 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum case DumpStyleModuleWithFileAddress: if (section_sp) { - s->Printf("%s[", section_sp->GetModule()->GetFileSpec().GetFilename().AsCString("<Unknown>")); + ModuleSP module_sp = section_sp->GetModule(); + if (module_sp) + s->Printf("%s[", module_sp->GetFileSpec().GetFilename().AsCString("<Unknown>")); + else + s->Printf("%s[","<Unknown>"); } // Fall through case DumpStyleFileAddress: |