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@cs.uiuc.edu
          Reporter: ema...@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.
_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to