git: 3eb26ef41ce8 - main - kdump: nicer printing of wait*() ID arguments
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Jun 2025 01:51:13 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=3eb26ef41ce8a1f78ae9a1236ffccd9ced89d32b
commit 3eb26ef41ce8a1f78ae9a1236ffccd9ced89d32b
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-06-04 01:51:06 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-06-04 01:51:06 +0000
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
---
usr.bin/kdump/kdump.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index a8f3df14f304..ff32dd418f24 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -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);