[lldb-dev] Linux ELF header e_ident[EI_OSABI] value

Howard Hellyer via lldb-dev lldb-dev at lists.llvm.org
Tue Aug 23 06:49:13 PDT 2016


> I would change it so that the "os" doesn't get set to anything when 
> it detects this in the core file. When an OS is not specified, the 
> llvm::Triple will return OSUnknown as the enumeration value for the 
> OS _and_ the llvm::StringRef value will return an empty string. This
> is known in LLDB term as a "unspecified unknown". This means the 
> triple will be "x86_64-*-<vendor>". An unspecified unknown is a 
> wildcard. Any plugins that are trying to load a core file should 
> watch for this and use it accordingly.
> 
> So the answer is not "treat ELF files with ELFOSABI_NONE set as 
> Linux", but "treat ELF files with ELFOSABI_NONE set as *". Please 
> submit a patch that implements this when you get the chance. Let me 
> know if you have any questions.

I think that's the current behaviour in ArchSpec.cpp. Setting it 
deliberately to UnknownOS prevents the code later on from refining it any 
further from the notes section of the core file. (Unless you meant 
somewhere else in which case I'll take a look.)


Howard Hellyer
IBM Runtime Technologies, IBM Systems






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160823/76cc96d1/attachment.html>


More information about the lldb-dev mailing list