freebsd-skq/usr.bin/kdump
John Baldwin 287b96dd25 Add handling for non-native error values to libsysdecode.
Add two new functions, sysdecode_abi_to_freebsd_errno() and
sysdecode_freebsd_to_abi_errno(), which convert errno values between
the native FreeBSD ABI and other supported ABIs. Note that the
mappings are not necessarily perfect meaning in some cases multiple
errors in one ABI might map to a single error in another ABI. In that
case, the reverse mapping will return one of the errors that maps, but
which error is non-deterministic.

Change truss to always report the raw error value to the user but
use libsysdecode to map it to a native errno value that can be used
with strerror() to generate a description. Previously truss reported
the "converted" error value. Now the user will always see the exact
error value that the application sees.

Change kdump to report the truly raw error value to the user. Previously
kdump would report the absolute value of the raw error value (so for
Linux binaries it didn't output the FreeBSD error value, but the positive
value of the Linux error). Now it reports the real (i.e. negative) error
value for Linux binaries. Also, use libsysdecode to convert the native
FreeBSD error reported in the ktrace record to the raw error used by the
ABI. This means that the Linux ABI can now be handled directly in
ktrsysret() and removes the need for linux_ktrsysret().

Reviewed by:	bdrewery, kib
Helpful notes:	wblock (manpage)
Differential Revision:	https://reviews.freebsd.org/D5314
2016-02-23 20:00:55 +00:00
..
kdump.1 Add `-S' to display syscall numbers in the output as well. 2014-03-28 16:11:20 +00:00
kdump.c Add handling for non-native error values to libsysdecode. 2016-02-23 20:00:55 +00:00
linux32_syscalls.conf Teach kdump to understand both linux emulation. 2015-05-24 16:22:03 +00:00
linux_syscalls.conf
Makefile Add support to libsysdecode for decoding system call names. 2016-01-26 19:07:09 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2016-02-16 02:14:30 +00:00
mksubr Decode the arguments passed to _umtx_op(). In particular, decode the 2014-10-13 16:37:06 +00:00