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

Howard Hellyer via lldb-dev lldb-dev at lists.llvm.org
Fri Aug 26 06:38:59 PDT 2016


Todd Fiala <todd.fiala at gmail.com> wrote on 25/08/2016 20:42:31:

> FWIW, I've taken a few whacks at getting Linux detected better over 
> the last few years, and haven't yet found a reliable way to detect 
> it from quite a few samples of cores from a number of different 
> systems.  We can spend more time looking into it, but that stone has
> been turned over several times.

I spent quite a lot of time looking at the output of readelf too. I was 
kind of hoping Linux was the only platform not using it's OSABI value, 
which would have worked.

The only other thing I thought of suggesting was having the ELFOSABI_NONE 
case ifdef'd so that lldb defaults to the platform that it was built for - 
on the assumption that you are probably opening a core from the machine 
you are on. (So on Linux ELFOSABI_NONE would mean Linux, on FreeBSD it 
would mean FreeBSD.) That would have meant lldb behaved differently 
depending on where it was compiled which seems wrong and would introduce 
awkward to debug behaviour so I ended up talking myself out of it.


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/20160826/425b81cb/attachment-0001.html>


More information about the lldb-dev mailing list