summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-29 17:25:54 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-29 17:25:54 +0000
commitb5ad4ec7a31206227b1cd657dd41b21cc6afc98e (patch)
tree68f35ccdff9e1410bca21aeb2e216fa91d45a19f /lldb/source/Plugins
parentf1f1c626e7fcd3db60641be223308390de288a41 (diff)
downloadbcm5719-llvm-b5ad4ec7a31206227b1cd657dd41b21cc6afc98e.tar.gz
bcm5719-llvm-b5ad4ec7a31206227b1cd657dd41b21cc6afc98e.zip
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
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp10
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp30
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp5
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp10
-rw-r--r--lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp18
-rw-r--r--lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp12
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp12
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp21
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp12
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp15
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp13
-rw-r--r--lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp10
13 files changed, 64 insertions, 114 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index a05e9e09d01..12e2174feeb 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -955,15 +955,9 @@ DynamicLoaderDarwinKernel::KextImageInfo::LoadImageUsingMemoryModule (Process *p
s->Printf ("Kernel slid 0x%" PRIx64 " in memory.\n", m_load_address - file_address);
}
}
- if (m_module_sp->GetFileSpec().GetDirectory().IsEmpty())
{
- s->Printf ("Loaded kernel file %s\n", m_module_sp->GetFileSpec().GetFilename().AsCString());
- }
- else
- {
- s->Printf ("Loaded kernel file %s/%s\n",
- m_module_sp->GetFileSpec().GetDirectory().AsCString(),
- m_module_sp->GetFileSpec().GetFilename().AsCString());
+ s->Printf ("Loaded kernel file %s\n",
+ m_module_sp->GetFileSpec().GetPath().c_str());
}
s->Flush ();
}
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index bef86ae2ffa..94c824a8a05 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -493,11 +493,10 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo&
else
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: unable to find and load segment named '%s' at 0x%" PRIx64 " in '%s/%s' in macosx dynamic loader plug-in.\n",
+ "warning: unable to find and load segment named '%s' at 0x%" PRIx64 " in '%s' in macosx dynamic loader plug-in.\n",
info.segments[i].name.AsCString("<invalid>"),
(uint64_t)new_section_load_addr,
- image_object_file->GetFileSpec().GetDirectory().AsCString(),
- image_object_file->GetFileSpec().GetFilename().AsCString());
+ image_object_file->GetFileSpec().GetPath().c_str());
}
}
}
@@ -573,10 +572,9 @@ DynamicLoaderMacOSXDYLD::UnloadImageLoadAddress (Module *module, DYLDImageInfo&
else
{
Host::SystemLog (Host::eSystemLogWarning,
- "warning: unable to find and unload segment named '%s' in '%s/%s' in macosx dynamic loader plug-in.\n",
+ "warning: unable to find and unload segment named '%s' in '%s' in macosx dynamic loader plug-in.\n",
info.segments[i].name.AsCString("<invalid>"),
- image_object_file->GetFileSpec().GetDirectory().AsCString(),
- image_object_file->GetFileSpec().GetFilename().AsCString());
+ image_object_file->GetFileSpec().GetPath().c_str());
}
}
}
@@ -1440,42 +1438,38 @@ DynamicLoaderMacOSXDYLD::DYLDImageInfo::PutToLog (Log *log) const
{
if (u)
{
- log->Printf("\t modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s' (UNLOADED)",
+ log->Printf("\t modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s' (UNLOADED)",
mod_date,
u[ 0], u[ 1], u[ 2], u[ 3],
u[ 4], u[ 5], u[ 6], u[ 7],
u[ 8], u[ 9], u[10], u[11],
u[12], u[13], u[14], u[15],
- file_spec.GetDirectory().AsCString(),
- file_spec.GetFilename().AsCString());
+ file_spec.GetPath().c_str());
}
else
- log->Printf("\t modtime=0x%8.8" PRIx64 " path='%s/%s' (UNLOADED)",
+ log->Printf("\t modtime=0x%8.8" PRIx64 " path='%s' (UNLOADED)",
mod_date,
- file_spec.GetDirectory().AsCString(),
- file_spec.GetFilename().AsCString());
+ file_spec.GetPath().c_str());
}
else
{
if (u)
{
- log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s/%s'",
+ log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X path='%s'",
address,
mod_date,
u[ 0], u[ 1], u[ 2], u[ 3],
u[ 4], u[ 5], u[ 6], u[ 7],
u[ 8], u[ 9], u[10], u[11],
u[12], u[13], u[14], u[15],
- file_spec.GetDirectory().AsCString(),
- file_spec.GetFilename().AsCString());
+ file_spec.GetPath().c_str());
}
else
{
- log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " path='%s/%s'",
+ log->Printf("\taddress=0x%16.16" PRIx64 " modtime=0x%8.8" PRIx64 " path='%s'",
address,
mod_date,
- file_spec.GetDirectory().AsCString(),
- file_spec.GetFilename().AsCString());
+ file_spec.GetPath().c_str());
}
for (uint32_t i=0; i<segments.size(); ++i)
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 2ca17e506be..a5e87fc358d 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -286,9 +286,8 @@ ObjectContainerBSDArchive::CreateInstance
if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data))
{
Timer scoped_timer (__PRETTY_FUNCTION__,
- "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")",
- module_sp->GetFileSpec().GetDirectory().AsCString(),
- module_sp->GetFileSpec().GetFilename().AsCString(),
+ "ObjectContainerBSDArchive::CreateInstance (module = %s, file = %p, file_offset = 0x%8.8" PRIx64 ", file_size = 0x%8.8" PRIx64 ")",
+ module_sp->GetFileSpec().GetPath().c_str(),
file, (uint64_t) file_offset, (uint64_t) length);
// Map the entire .a file to be sure that we don't lose any data if the file
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 7bd6020f1e6..b94ebca297d 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1916,11 +1916,10 @@ ObjectFileMachO::ParseSymtab (bool minimize)
// string values should have an offset zero which points
// to an empty C-string
Host::SystemLog (Host::eSystemLogError,
- "error: DSC unmapped local symbol[%u] has invalid string table offset 0x%x in %s/%s, ignoring symbol\n",
+ "error: DSC unmapped local symbol[%u] has invalid string table offset 0x%x in %s, ignoring symbol\n",
entry_index,
nlist.n_strx,
- module_sp->GetFileSpec().GetDirectory().GetCString(),
- module_sp->GetFileSpec().GetFilename().GetCString());
+ module_sp->GetFileSpec().GetPath().c_str());
continue;
}
if (symbol_name[0] == '\0')
@@ -2653,11 +2652,10 @@ ObjectFileMachO::ParseSymtab (bool minimize)
// string values should have an offset zero which points
// to an empty C-string
Host::SystemLog (Host::eSystemLogError,
- "error: symbol[%u] has invalid string table offset 0x%x in %s/%s, ignoring symbol\n",
+ "error: symbol[%u] has invalid string table offset 0x%x in %s, ignoring symbol\n",
nlist_idx,
nlist.n_strx,
- module_sp->GetFileSpec().GetDirectory().GetCString(),
- module_sp->GetFileSpec().GetFilename().GetCString());
+ module_sp->GetFileSpec().GetPath().c_str());
continue;
}
if (symbol_name[0] == '\0')
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index f6cd4c2c684..07846c81cc7 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -232,10 +232,8 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec &exe_file,
if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL)
{
exe_module_sp.reset();
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain the architecture %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s",
+ exe_file.GetPath().c_str(),
exe_arch.GetArchitectureName());
}
}
@@ -269,10 +267,8 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || !exe_module_sp)
{
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain any '%s' platform architectures: %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
+ exe_file.GetPath().c_str(),
GetShortPluginName(),
arch_names.GetString().c_str());
}
@@ -280,10 +276,8 @@ PlatformFreeBSD::ResolveExecutable (const FileSpec &exe_file,
}
else
{
- error.SetErrorStringWithFormat ("'%s%s%s' does not exist",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""));
+ error.SetErrorStringWithFormat ("'%s' does not exist",
+ exe_file.GetPath().c_str());
}
return error;
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index f3886365b9e..1078a23443f 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -206,10 +206,8 @@ PlatformLinux::ResolveExecutable (const FileSpec &exe_file,
if (!exe_module_sp || exe_module_sp->GetObjectFile() == NULL)
{
exe_module_sp.reset();
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain the architecture %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s",
+ exe_file.GetPath().c_str(),
exe_arch.GetArchitectureName());
}
}
@@ -242,10 +240,8 @@ PlatformLinux::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || !exe_module_sp)
{
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain any '%s' platform architectures: %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
+ exe_file.GetPath().c_str(),
GetShortPluginName(),
arch_names.GetString().c_str());
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index fc3788529f4..b3775d410ae 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -196,10 +196,8 @@ PlatformDarwin::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || exe_module_sp.get() == NULL || exe_module_sp->GetObjectFile() == NULL)
{
exe_module_sp.reset();
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain the architecture %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain the architecture %s",
+ exe_file.GetPath().c_str(),
exe_arch.GetArchitectureName());
}
}
@@ -232,10 +230,8 @@ PlatformDarwin::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || !exe_module_sp)
{
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain any '%s' platform architectures: %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
+ exe_file.GetPath().c_str(),
GetShortPluginName(),
arch_names.GetString().c_str());
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
index 48a25c4d258..fe6d358e6fc 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
@@ -205,10 +205,9 @@ PlatformRemoteiOS::GetStatus (Stream &strm)
for (uint32_t i=0; i<num_sdk_infos; ++i)
{
const SDKDirectoryInfo &sdk_dir_info = m_sdk_directory_infos[i];
- strm.Printf (" SDK Roots: [%2u] \"%s/%s\"\n",
+ strm.Printf (" SDK Roots: [%2u] \"%s\"\n",
i,
- sdk_dir_info.directory.GetDirectory().GetCString(),
- sdk_dir_info.directory.GetFilename().GetCString());
+ sdk_dir_info.directory.GetPath().c_str());
}
}
@@ -278,20 +277,16 @@ PlatformRemoteiOS::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || !exe_module_sp)
{
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain any '%s' platform architectures: %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
+ exe_file.GetPath().c_str(),
GetShortPluginName(),
arch_names.GetString().c_str());
}
}
else
{
- error.SetErrorStringWithFormat ("'%s%s%s' does not exist",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""));
+ error.SetErrorStringWithFormat ("'%s' does not exist",
+ exe_file.GetPath().c_str());
}
return error;
@@ -712,7 +707,7 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
{
if (GetFileInSDK (platform_file_path, m_last_module_sdk_idx, local_file))
{
- //printf ("sdk[%u] last: '%s/%s'\n", m_last_module_sdk_idx, local_file.GetDirectory().GetCString(), local_file.GetFilename().GetCString());
+ //printf ("sdk[%u] last: '%s'\n", m_last_module_sdk_idx, local_file.GetPath().c_str());
module_sp.reset();
error = ResolveExecutable (local_file,
module_spec.GetArchitecture(),
@@ -738,7 +733,7 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
}
if (GetFileInSDK (platform_file_path, sdk_idx, local_file))
{
- //printf ("sdk[%u]: '%s/%s'\n", sdk_idx, local_file.GetDirectory().GetCString(), local_file.GetFilename().GetCString());
+ //printf ("sdk[%u]: '%s'\n", sdk_idx, local_file.GetPath().c_str());
error = ResolveExecutable (local_file,
module_spec.GetArchitecture(),
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
index 90032259603..5f1cfc8dc86 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
@@ -240,20 +240,16 @@ PlatformiOSSimulator::ResolveExecutable (const FileSpec &exe_file,
if (error.Fail() || !exe_module_sp)
{
- error.SetErrorStringWithFormat ("'%s%s%s' doesn't contain any '%s' platform architectures: %s",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""),
+ error.SetErrorStringWithFormat ("'%s' doesn't contain any '%s' platform architectures: %s",
+ exe_file.GetPath().c_str(),
GetShortPluginName(),
arch_names.GetString().c_str());
}
}
else
{
- error.SetErrorStringWithFormat ("'%s%s%s' does not exist",
- exe_file.GetDirectory().AsCString(""),
- exe_file.GetDirectory() ? "/" : "",
- exe_file.GetFilename().AsCString(""));
+ error.SetErrorStringWithFormat ("'%s' does not exist",
+ exe_file.GetPath().c_str());
}
return error;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
index 40300922713..4c76eed8166 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -61,18 +61,16 @@ DWARFDebugInfo::GetCompileUnitAranges ()
if (debug_aranges_data.GetByteSize() > 0)
{
if (log)
- log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s/%s\" from .debug_aranges",
- m_dwarf2Data->GetObjectFile()->GetFileSpec().GetDirectory().GetCString(),
- m_dwarf2Data->GetObjectFile()->GetFileSpec().GetFilename().GetCString());
+ log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s\" from .debug_aranges",
+ m_dwarf2Data->GetObjectFile()->GetFileSpec().GetPath().c_str());
m_cu_aranges_ap->Extract (debug_aranges_data);
}
else
{
if (log)
- log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s/%s\" by parsing",
- m_dwarf2Data->GetObjectFile()->GetFileSpec().GetDirectory().GetCString(),
- m_dwarf2Data->GetObjectFile()->GetFileSpec().GetFilename().GetCString());
+ log->Printf ("DWARFDebugInfo::GetCompileUnitAranges() for \"%s\" by parsing",
+ m_dwarf2Data->GetObjectFile()->GetFileSpec().GetPath().c_str());
const size_t num_compile_units = GetNumCompileUnits();
const bool clear_dies_if_already_not_parsed = true;
for (size_t idx = 0; idx < num_compile_units; ++idx)
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 6bb8fd17f8d..cbed4f22407 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2799,9 +2799,8 @@ SymbolFileDWARF::Index ()
#if defined (ENABLE_DEBUG_PRINTF)
StreamFile s(stdout, false);
- s.Printf ("DWARF index for '%s/%s':",
- GetObjectFile()->GetFileSpec().GetDirectory().AsCString(),
- GetObjectFile()->GetFileSpec().GetFilename().AsCString());
+ s.Printf ("DWARF index for '%s':",
+ GetObjectFile()->GetFileSpec().GetPath().c_str());
s.Printf("\nFunction basenames:\n"); m_function_basename_index.Dump (&s);
s.Printf("\nFunction fullnames:\n"); m_function_fullname_index.Dump (&s);
s.Printf("\nFunction methods:\n"); m_function_method_index.Dump (&s);
@@ -6478,12 +6477,11 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
{
clang::CXXMethodDecl *cxx_method_decl;
// REMOVE THE CRASH DESCRIPTION BELOW
- Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8" PRIx64 " from %s/%s",
+ Host::SetCrashDescriptionWithFormat ("SymbolFileDWARF::ParseType() is adding a method %s to class %s in DIE 0x%8.8" PRIx64 " from %s",
type_name_cstr,
class_type->GetName().GetCString(),
MakeUserID(die->GetOffset()),
- m_obj_file->GetFileSpec().GetDirectory().GetCString(),
- m_obj_file->GetFileSpec().GetFilename().GetCString());
+ m_obj_file->GetFileSpec().GetPath().c_str());
const bool is_attr_used = false;
@@ -7568,10 +7566,9 @@ SymbolFileDWARF::DumpIndexes ()
{
StreamFile s(stdout, false);
- s.Printf ("DWARF index for (%s) '%s/%s':",
+ s.Printf ("DWARF index for (%s) '%s':",
GetObjectFile()->GetModule()->GetArchitecture().GetArchitectureName(),
- GetObjectFile()->GetFileSpec().GetDirectory().AsCString(),
- GetObjectFile()->GetFileSpec().GetFilename().AsCString());
+ GetObjectFile()->GetFileSpec().GetPath().c_str());
s.Printf("\nFunction basenames:\n"); m_function_basename_index.Dump (&s);
s.Printf("\nFunction fullnames:\n"); m_function_fullname_index.Dump (&s);
s.Printf("\nFunction methods:\n"); m_function_method_index.Dump (&s);
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<n; ++i)
{
const FileRangeMap::Entry &entry = oso_file_range_map.GetEntryRef(i);
diff --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
index 032fa0a1b61..c04ad78a283 100644
--- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
+++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
@@ -159,9 +159,8 @@ SymbolVendorMacOSX::CreateInstance (const lldb::ModuleSP &module_sp, lldb_privat
return NULL;
Timer scoped_timer (__PRETTY_FUNCTION__,
- "SymbolVendorMacOSX::CreateInstance (module = %s/%s)",
- module_sp->GetFileSpec().GetDirectory().AsCString(),
- module_sp->GetFileSpec().GetFilename().AsCString());
+ "SymbolVendorMacOSX::CreateInstance (module = %s)",
+ module_sp->GetFileSpec().GetPath().c_str());
SymbolVendorMacOSX* symbol_vendor = new SymbolVendorMacOSX(module_sp);
if (symbol_vendor)
{
@@ -173,9 +172,8 @@ SymbolVendorMacOSX::CreateInstance (const lldb::ModuleSP &module_sp, lldb_privat
if (obj_file)
{
Timer scoped_timer2 ("SymbolVendorMacOSX::CreateInstance () locate dSYM",
- "SymbolVendorMacOSX::CreateInstance (module = %s/%s) locate dSYM",
- module_sp->GetFileSpec().GetDirectory().AsCString(),
- module_sp->GetFileSpec().GetFilename().AsCString());
+ "SymbolVendorMacOSX::CreateInstance (module = %s) locate dSYM",
+ module_sp->GetFileSpec().GetPath().c_str());
// First check to see if the module has a symbol file in mind already.
// If it does, then we MUST use that.
OpenPOWER on IntegriCloud