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)
Fri, Oct 3, 5:08 PM
Unknown Object (File)
Fri, Oct 3, 4:47 PM
Unknown Object (File)
Fri, Oct 3, 2:59 PM
Unknown Object (File)
Sun, Sep 28, 12:18 AM
Unknown Object (File)
Aug 20 2025, 5:54 PM
Unknown Object (File)
Aug 14 2025, 12:34 PM
Unknown Object (File)
Aug 12 2025, 8:24 PM
Unknown Object (File)
Aug 4 2025, 10:30 AM
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.