[lldb] [ObjectFile/ELF] Fix recognizing NetBSD images
authorMichal Gorny <mgorny@gentoo.org>
Wed, 20 Feb 2019 14:31:06 +0000 (14:31 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Wed, 20 Feb 2019 14:31:06 +0000 (14:31 +0000)
commit4f134fb66019d948d1f68d62a92f2a01b22eb7ee
tree5c22372137c5661792a7f8749871d2e6dadc48f3
parentdac37fb38d01aac823fcc10b446536500450695f
[lldb] [ObjectFile/ELF] Fix recognizing NetBSD images

Split the recognition into NetBSD executables & shared libraries
and core(5) files.

Introduce new owner type: "NetBSD-CORE", as core(5) files are not tagged
in the same way as regular NetBSD executables.

Stop using incorrectly ABI_TAG and ABI_SIZE.  Introduce IDENT_TAG,
IDENT_DECSZ, IDENT_NAMESZ and PROCINFO.

The new values detect correctly the NetBSD images.

The patch has been originally written by Kamil Rytarowski.  I've added
tests and applied minor code changes per review.  The work has been
sponsored by the NetBSD Foundation.

Differential Revision: https://reviews.llvm.org/D42870

llvm-svn: 354466
lldb/lit/Modules/ELF/Inputs/netbsd-amd64.core [new file with mode: 0644]
lldb/lit/Modules/ELF/netbsd-core-amd64.test [new file with mode: 0644]
lldb/lit/Modules/ELF/netbsd-exec-8.99.30-amd64.yaml [new file with mode: 0644]
lldb/lit/Modules/lit.local.cfg
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp