summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/SectionLoadList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/SectionLoadList.cpp')
-rw-r--r--lldb/source/Target/SectionLoadList.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp
index da3aea5034d..d79c32eeb53 100644
--- a/lldb/source/Target/SectionLoadList.cpp
+++ b/lldb/source/Target/SectionLoadList.cpp
@@ -172,10 +172,16 @@ SectionLoadList::SetSectionUnloaded (const lldb::SectionSP &section_sp)
if (log)
{
- const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
+ ModuleSP module_sp = section_sp->GetModule();
+ std::string module_name("<Unknown>");
+ if (module_sp)
+ {
+ const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
+ module_name = module_file_spec.GetPath();
+ }
log->Printf ("SectionLoadList::%s (section = %p (%s.%s))",
__FUNCTION__, static_cast<void*>(section_sp.get()),
- module_file_spec.GetPath().c_str(),
+ module_name.c_str(),
section_sp->GetName().AsCString());
}
@@ -203,10 +209,16 @@ SectionLoadList::SetSectionUnloaded (const lldb::SectionSP &section_sp, addr_t l
if (log)
{
- const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
+ ModuleSP module_sp = section_sp->GetModule();
+ std::string module_name("<Unknown>");
+ if (module_sp)
+ {
+ const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
+ module_name = module_file_spec.GetPath();
+ }
log->Printf ("SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16" PRIx64 ")",
__FUNCTION__, static_cast<void*>(section_sp.get()),
- module_file_spec.GetPath().c_str(),
+ module_name.c_str(),
section_sp->GetName().AsCString(), load_addr);
}
bool erased = false;
OpenPOWER on IntegriCloud