kdump: simplify/remove per-arch #ifdefs

It is acceptable for syscallabi to map SV_ABI to SYSDECODE_ABI on all
architectures; libsysdecode will return not-found sentinel values if
it does not have a syscall name or errno mapping for a given
architecture.

Also, use __LP64__ for the SV_ILP32 -> SYSDECODE_ABI_LINUX32 mapping,
for any future 32- on 64-bit linuxulator implementation.

Reviewed by:	jhb
Sponsored by:	Turing Robotic Industries Inc.
This commit is contained in:
Ed Maste 2018-04-24 19:23:26 +00:00
parent c653786de0
commit fc7d33b49e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=332964

View File

@ -758,18 +758,14 @@ syscallabi(u_int sv_flags)
switch (sv_flags & SV_ABI_MASK) {
case SV_ABI_FREEBSD:
return (SYSDECODE_ABI_FREEBSD);
#if defined(__amd64__) || defined(__i386__)
case SV_ABI_LINUX:
#ifdef __amd64__
#ifdef __LP64__
if (sv_flags & SV_ILP32)
return (SYSDECODE_ABI_LINUX32);
#endif
return (SYSDECODE_ABI_LINUX);
#endif
#if defined(__aarch64__) || defined(__amd64__)
case SV_ABI_CLOUDABI:
return (SYSDECODE_ABI_CLOUDABI64);
#endif
default:
return (SYSDECODE_ABI_UNKNOWN);
}