bb23932803
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 efbbbf570d70b and it was repurposed as ktr_kid in c6854c347f4d8. 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