Page MenuHomeFreeBSD

kdump: nicer printing of wait*() ID arguments
ClosedPublic

Authored by kevans on May 23 2025, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 26, 11:52 PM
Unknown Object (File)
Thu, May 21, 2:59 AM
Unknown Object (File)
Wed, May 20, 5:04 PM
Unknown Object (File)
Wed, May 20, 9:26 AM
Unknown Object (File)
Tue, May 19, 4:53 PM
Unknown Object (File)
Sat, May 16, 6:49 PM
Unknown Object (File)
Thu, May 7, 10:56 AM
Unknown Object (File)
Mon, May 4, 11:31 PM
Subscribers

Details

Summary

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 coerce -1 properly in wait4(2) to get it to render properly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It might be nice to apply similar handling to kill(2), since the first argument there can also be negative.

This revision is now accepted and ready to land.May 24 2025, 1:22 AM

It might be nice to apply similar handling to kill(2), since the first argument there can also be negative.

Good point, will stage that next. I went with *ip = (pid_t)*ip there, which I think I like better as a pattern than the special case for -1 here... I think I'll switch wait 4 to it pre-commit.

This revision was automatically updated to reflect the committed changes.