[lldb-dev] [Bug 17209] New: ObjectFileELF::GetModuleSpecifications overrides OS and Vendor name with those from host

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 12 08:08:07 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17209

            Bug ID: 17209
           Summary: ObjectFileELF::GetModuleSpecifications overrides OS
                    and Vendor name with those from host
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: emaste at freebsd.org
    Classification: Unclassified

spec.GetArchitecture().GetTriple().setOSName
(Host::GetOSString().GetCString());
spec.GetArchitecture().GetTriple().setVendorName(Host::GetVendorString().GetCString());

We would like to be able to open Linux and FreeBSD core files on any of Linux,
FreeBSD, and OS X.

Michael provided a reference for the GNU ABI tag already:
http://refspecs.linuxfoundation.org/LSB_1.2.0/gLSB/noteabitag.html

Note that the build ID page reports that "the name is not normative, and the
section can be merged with other SHT_NOTE sections."
http://fedoraproject.org/wiki/Releases/FeatureBuildId
We should apply the same logic for ABI tag parsing, using the note name and not
relying on the section name.

We can fall back to using the Host's OS/Vendor if the note is not found.

A handy reference:

** Linux **
Name: GNU
Type: NT_GNU_ABI_TAG (1)
Desc: Four 4-byte words, as follows
 OS (0=linux)
 major version (minimum compatible kernel version)
 minor version
 dot version

** FreeBSD **
Name: FreeBSD
Type: NT_FREEBSD_ABI_TAG (1)
Desc: One 4-byte word

** NetBSD **
Name: NetBSD
Type: NT_NETBSD_IDENT(?) (1)
Desc: One 4-byte word containing the version constant

http://www.netbsd.org/docs/kernel/elf-notes.html

** OpenBSD **
Name: OpenBSD
Type: NT_OPENBSD_IDENT (1)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130912/a822dfd4/attachment.html>


More information about the lldb-dev mailing list