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
diff --git a/lldb/source/Target/SectionLoadList.cpp b/lldb/source/Target/SectionLoadList.cpp
index 9b4bdd0..af56365 100644
--- a/lldb/source/Target/SectionLoadList.cpp
+++ b/lldb/source/Target/SectionLoadList.cpp
@@ -64,12 +64,10 @@
     if (log)
     {
         const FileSpec &module_file_spec (section->GetModule()->GetFileSpec());
-        log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16" PRIx64 ")",
+        log->Printf ("SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16" PRIx64 ")",
                      __FUNCTION__,
                      section.get(),
-                     module_file_spec.GetDirectory().AsCString(),
-                     module_file_spec.GetDirectory() ? "/" : "",
-                     module_file_spec.GetFilename().AsCString(),
+                     module_file_spec.GetPath().c_str(),
                      section->GetName().AsCString(),
                      load_addr);
     }
@@ -141,12 +139,10 @@
         if (log)
         {
             const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
-            log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s))",
+            log->Printf ("SectionLoadList::%s (section = %p (%s.%s))",
                          __FUNCTION__,
                          section_sp.get(),
-                         module_file_spec.GetDirectory().AsCString(),
-                         module_file_spec.GetDirectory() ? "/" : "",
-                         module_file_spec.GetFilename().AsCString(),
+                         module_file_spec.GetPath().c_str(),
                          section_sp->GetName().AsCString());
         }
 
@@ -175,12 +171,10 @@
     if (log)
     {
         const FileSpec &module_file_spec (section_sp->GetModule()->GetFileSpec());
-        log->Printf ("SectionLoadList::%s (section = %p (%s%s%s.%s), load_addr = 0x%16.16" PRIx64 ")",
+        log->Printf ("SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16" PRIx64 ")",
                      __FUNCTION__,
                      section_sp.get(),
-                     module_file_spec.GetDirectory().AsCString(),
-                     module_file_spec.GetDirectory() ? "/" : "",
-                     module_file_spec.GetFilename().AsCString(),
+                     module_file_spec.GetPath().c_str(),
                      section_sp->GetName().AsCString(),
                      load_addr);
     }