svn commit: r278909 - head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF

Ed Maste emaste at FreeBSD.org
Tue Feb 17 18:33:18 UTC 2015


Author: emaste
Date: Tue Feb 17 18:33:17 2015
New Revision: 278909
URL: https://svnweb.freebsd.org/changeset/base/278909

Log:
  lldb: workaround to permit cross-arch core file debugging
  
  FreeBSD core files have no section table and thus LLDB's OS and vendor
  detection logic does not work. If we encounter such an ELF file, update
  an unknown OS to match the host.
  
  This is not really the correct way to handle this, but more extensive
  rework of ObjectFileELF will be needed and this change restores cross-
  arch core debugging until that can be completed.

Modified:
  head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Modified: head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
==============================================================================
--- head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp	Tue Feb 17 18:10:46 2015	(r278908)
+++ head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp	Tue Feb 17 18:33:17 2015	(r278909)
@@ -1331,8 +1331,11 @@ ObjectFileELF::GetSectionHeaderInfo(Sect
     }
 
     // If there are no section headers we are done.
-    if (header.e_shnum == 0)
+    if (header.e_shnum == 0) {
+        if (arch_spec.GetTriple().getOS() == llvm::Triple::OSType::UnknownOS)
+            arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data());
         return 0;
+    }
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MODULES));
 


More information about the svn-src-all mailing list