diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-02-17 18:33:17 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-02-17 18:33:17 +0000 |
commit | b153f37ffcefa028161d80c3852223dea7c93f4c (patch) | |
tree | 065db9f0d8a2ea1ff533f060977be2245e068962 /contrib/llvm | |
parent | 1d4a49a324d6243fc4a2bddd5a19efa01e6c4b86 (diff) | |
download | src-b153f37ffcefa028161d80c3852223dea7c93f4c.tar.gz src-b153f37ffcefa028161d80c3852223dea7c93f4c.zip |
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.
Notes
Notes:
svn path=/head/; revision=278909
Diffstat (limited to 'contrib/llvm')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index d86aee78947f..1e703281b2c6 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1331,8 +1331,11 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, } // 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)); |