From owner-svn-src-all@FreeBSD.ORG Tue Feb 17 18:33:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A279A8B; Tue, 17 Feb 2015 18:33:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65024E39; Tue, 17 Feb 2015 18:33:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1HIXIgD064215; Tue, 17 Feb 2015 18:33:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1HIXI6q064214; Tue, 17 Feb 2015 18:33:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201502171833.t1HIXI6q064214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Feb 2015 18:33:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278909 - head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 18:33:18 -0000 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));