freebsd-nq/usr.bin/kdump
Brooks Davis bb23932803 ktrace: make ktr_tid a long not intptr_t (NFC)
Long ago, ktr_tid was ktr_buffer which pointed to the buffer following
the header and was used internally in the kernel.  Use was removed in
efbbbf570d and it was repurposed as ktr_kid in c6854c347f.  For
ABI reasons, it stayed an intptr_t rather than becoming an lwpid_t at
the time.  Since it doesn't hold a pointer any more (unless you have
a ktrace.out from 2005), change the type to long which is alwasy the
same size on all supported architectures.  Add a suggestion to change
the type to lwpid_t (__int32_t) on a future ABI break.

Remove most remaining references to ktr_buffer, retaing a comment in
kdump.c explaining why negative values are treated as 0.  While here,
accept that pid_t and lwpid_t are of type int and simplify casts in
printf.

This changed was motivated by CheriBSD where intptr_t is 16-bytes
in the pure-capability ABI.

Reviewed by:	kib, markj
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D36599
2022-09-17 09:21:59 +01:00
..
kdump.1 kdump(1): Sort options in alphabetical order. 2022-07-16 12:47:54 +03:00
kdump.c ktrace: make ktr_tid a long not intptr_t (NFC) 2022-09-17 09:21:59 +01:00
kdump.h kdump: For future use made decode_filemode() public 2022-06-22 14:26:50 +03:00
linux.c kdump: Decode Linux *at() syscalls 2022-06-22 14:29:38 +03:00
Makefile kdump: Add preliminary support for decoding Linux syscalls 2022-06-22 14:03:56 +03:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00