From b5ad4ec7a31206227b1cd657dd41b21cc6afc98e Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 29 Apr 2013 17:25:54 +0000 Subject: Cleanup logging to use the new "std::string FileSpec::GetPath()" function. Also added a similar function for modules: std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717 --- .../Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp') diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 096b5fc0717..941484ea3a5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -59,13 +59,9 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(SymbolFileDWARFDebugMa if (log) { ConstString object_name (oso_module->GetObjectName()); - log->Printf("%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s/%s%s%s%s')", + log->Printf("%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s')", this, - oso_module->GetFileSpec().GetDirectory().GetCString(), - oso_module->GetFileSpec().GetFilename().GetCString(), - object_name ? "(" : "", - object_name ? object_name.GetCString() : "", - object_name ? ")" : ""); + oso_module->GetSpecificationDescription().c_str()); } @@ -1415,10 +1411,9 @@ SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (CompileUnitInfo *cu_info) #if defined(DEBUG_OSO_DMAP) const FileRangeMap &oso_file_range_map = cu_info->GetFileRangeMap(this); const size_t n = oso_file_range_map.GetSize(); - printf ("SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (cu_info = %p) %s/%s\n", + printf ("SymbolFileDWARFDebugMap::FinalizeOSOFileRanges (cu_info = %p) %s\n", cu_info, - cu_info->oso_sp->module_sp->GetFileSpec().GetDirectory().GetCString(), - cu_info->oso_sp->module_sp->GetFileSpec().GetFilename().GetCString()); + cu_info->oso_sp->module_sp->GetFileSpec().GetPath().c_str()); for (size_t i=0; i