diff options
author | jhb <jhb@FreeBSD.org> | 2016-03-09 18:38:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-03-09 18:38:30 +0000 |
commit | e641458f7012aa8c7ad2bc4f3ea9cf9ee880e17e (patch) | |
tree | d277f27f131296ec3b5bc25b04360a9e300f94d3 /usr.bin | |
parent | b4a1e4d0b1ed37930ebad858c8f8ac6a736a1a60 (diff) | |
download | FreeBSD-src-e641458f7012aa8c7ad2bc4f3ea9cf9ee880e17e.zip FreeBSD-src-e641458f7012aa8c7ad2bc4f3ea9cf9ee880e17e.tar.gz |
Fix reporting of the CloudABI ABI in kdump.
- Advertise the word size for CloudABI ABIs via the SV_LP64 flag. All of
the other ABIs include either SV_ILP32 or SV_LP64.
- Fix kdump to not assume a 32-bit ABI if the ABI flags field is non-zero
but SV_LP64 isn't set. Instead, only assume a 32-bit ABI if SV_ILP32 is
set and fallback to the unknown value of "00" if neither SV_LP64 nor
SV_ILP32 is set.
Reviewed by: kib, ed
Differential Revision: https://reviews.freebsd.org/D5560
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/kdump/kdump.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index e45a733..a4d5e64 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -529,12 +529,11 @@ abidump(struct ktr_header *kth) break; } - if (flags != 0) { - if (flags & SV_LP64) - arch = "64"; - else - arch = "32"; - } else + if (flags & SV_LP64) + arch = "64"; + else if (flags & SV_ILP32) + arch = "32"; + else arch = "00"; printf("%s%s ", abi, arch); |