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.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180717 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index e673a0a..85bece8 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -139,12 +139,10 @@
if (log)
{
- log->Printf ("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s%s%s)) => %i",
+ log->Printf ("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s)) => %i",
module_sp.get(),
platform_file.get(),
- platform_file->GetDirectory().GetCString(),
- platform_file->GetDirectory() ? "/" : "",
- platform_file->GetFilename().GetCString(),
+ platform_file->GetPath().c_str(),
result);
}
return result;