asf, csplit, tabs, and asa

Hiten Pandya’s added asf(8): Add Symbol File. It’s ported from FreeBSD – I’m adding the commit comment below. Also, csplit(1), tabs(1) as specified in IEEE Std. 1003.1-2001 (SUSv3) and ported from Tim J. Robbins’ code on FreeBSD. He’s also committed the POSIXv2 asa(1) utility for interpretation of FORTRAN carriage-control characters. How often does that happen?

Add a helper utility, called asf(8): Add Symbol File.

The purpose of this utility is to extract start addresses from kldstat(8)’s output and prepare a .gdbinit style file (called .asf) with GDB commands to load the KLD files at the right offset.

The file can then be given to the ‘source’ command of GDB so that it does its magic. This is how one can invoke the asf(8) command:

# asf -k -f -s -x /modules gdb.kldsyms.asf

Note, the ‘-k’ output invokes kldstat(8) automatically, otherwise it accepts kldstat(8) sytle output on stdin, which can be produced by a gdb macro so that is is equally useful in post-crash analysis.

One needs to compile the module with debugging symbols, though”.