kdump: nicer printing of wait*() ID arguments
Currently, both of these will print pid/uid/gid/sid/jid in hex, which isn't very helpful for eyeballing. Align more closely with truss(1) and print these in decimal instead. `ip` is likely wider than our ID type, so we do a small casting trick in wait4(2) to get it sign-extended and rendered properly. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50496
This commit is contained in:
@@ -937,7 +937,8 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
|
||||
narg -= 2;
|
||||
break;
|
||||
case SYS_wait4:
|
||||
print_number(ip, narg, c);
|
||||
*ip = (pid_t)*ip;
|
||||
print_decimal_number(ip, narg, c);
|
||||
print_number(ip, narg, c);
|
||||
putchar(',');
|
||||
print_mask_arg0(sysdecode_wait4_options, *ip);
|
||||
@@ -950,7 +951,7 @@ ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
|
||||
c = ',';
|
||||
ip++;
|
||||
narg--;
|
||||
print_number64(first, ip, narg, c);
|
||||
print_decimal_number64(first, ip, narg, c);
|
||||
print_number(ip, narg, c);
|
||||
putchar(',');
|
||||
print_mask_arg(sysdecode_wait6_options, *ip);
|
||||
|
||||
Reference in New Issue
Block a user