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:
parent
c653786de0
commit
fc7d33b49e
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user