Page MenuHomeFreeBSD

Remove spurious ABI tags from kdump output.
ClosedPublic

Authored by jhb on Aug 6 2018, 4:58 PM.
Tags
None
Referenced Files
F109508078: D16608.diff
Thu, Feb 6, 12:07 AM
Unknown Object (File)
Fri, Jan 31, 1:07 AM
Unknown Object (File)
Sun, Jan 26, 6:25 PM
Unknown Object (File)
Sun, Jan 26, 6:21 PM
Unknown Object (File)
Fri, Jan 17, 9:10 PM
Unknown Object (File)
Tue, Jan 14, 10:46 PM
Unknown Object (File)
Nov 27 2024, 3:25 AM
Unknown Object (File)
Nov 22 2024, 1:41 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.