Page MenuHomeFreeBSD

Remove spurious ABI tags from kdump output.
ClosedPublic

Authored by jhb on Aug 6 2018, 4:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 1:41 PM
Unknown Object (File)
Sat, Nov 16, 2:00 AM
Unknown Object (File)
Thu, Nov 14, 4:43 PM
Unknown Object (File)
Thu, Nov 14, 4:40 PM
Unknown Object (File)
Wed, Nov 6, 12:30 AM
Unknown Object (File)
Fri, Nov 1, 4:40 PM
Unknown Object (File)
Sun, Oct 27, 4:26 PM
Unknown Object (File)
Sep 19 2024, 1:51 PM
Subscribers

Details

Summary

The abidump routine output an ABI tag when -A was specified for records
that were not displayed due to type or pid filtering. To fix, split
the code to lookup the ABI from the code to display the ABI, move the
code to display the ABI into dumpheader(), and move dumpheader() later
in the main loop as a simplification. Previously dumpheader() was
called under a condition that repeated conditions made later in the
main loop.

Test Plan
  • ktrace ls
  • kdump -A -t n ls

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib added inline comments.
usr.bin/kdump/kdump.c
697 ↗(On Diff #46346)

if (abiflag != 0) {

713 ↗(On Diff #46346)

!= 0 as well.

718 ↗(On Diff #46346)

BTW, is this for alignment ? Would it better to print to spaces instead ?

This revision is now accepted and ready to land.Aug 6 2018, 9:52 PM
usr.bin/kdump/kdump.c
697 ↗(On Diff #46346)

The rest of this function uses the current style. I could make it a bool as a followup perhaps. For tests that are in fact booleans the != 0 seems overly verbose.

718 ↗(On Diff #46346)

Possibly, or '??'

This revision was automatically updated to reflect the committed changes.