diff options
Diffstat (limited to 'lldb/source/Target/SectionLoadList.cpp')
-rw-r--r-- | lldb/source/Target/SectionLoadList.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp index 0ac5cfac7f2..3dc39443566 100644 --- a/lldb/source/Target/SectionLoadList.cpp +++ b/lldb/source/Target/SectionLoadList.cpp @@ -67,21 +67,13 @@ SectionLoadList::GetSectionLoadAddress(const lldb::SectionSP §ion) const { bool SectionLoadList::SetSectionLoadAddress(const lldb::SectionSP §ion, addr_t load_addr, bool warn_multiple) { - Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER | - LIBLLDB_LOG_VERBOSE)); - + Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); ModuleSP module_sp(section->GetModule()); if (module_sp) { - if (log) { - const FileSpec &module_file_spec(module_sp->GetFileSpec()); - log->Printf("SectionLoadList::%s (section = %p (%s.%s), load_addr = " - "0x%16.16" PRIx64 ") module = %p", - __FUNCTION__, static_cast<void *>(section.get()), - module_file_spec.GetPath().c_str(), - section->GetName().AsCString(), load_addr, - static_cast<void *>(module_sp.get())); - } + LLDB_LOGV(log, "(section = {0} ({1}.{2}), load_addr = {3:x}) module = {4}", + section.get(), module_sp->GetFileSpec(), section->GetName(), + load_addr, module_sp.get()); if (section->GetByteSize() == 0) return false; // No change @@ -147,10 +139,9 @@ size_t SectionLoadList::SetSectionUnloaded(const lldb::SectionSP §ion_sp) { size_t unload_count = 0; if (section_sp) { - Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER | - LIBLLDB_LOG_VERBOSE)); + Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); - if (log) { + if (log && log->GetVerbose()) { ModuleSP module_sp = section_sp->GetModule(); std::string module_name("<Unknown>"); if (module_sp) { @@ -183,10 +174,9 @@ size_t SectionLoadList::SetSectionUnloaded(const lldb::SectionSP §ion_sp) { bool SectionLoadList::SetSectionUnloaded(const lldb::SectionSP §ion_sp, addr_t load_addr) { - Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER | - LIBLLDB_LOG_VERBOSE)); + Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); - if (log) { + if (log && log->GetVerbose()) { ModuleSP module_sp = section_sp->GetModule(); std::string module_name("<Unknown>"); if (module_sp) { |