xref: /dragonfly/usr.sbin/asf/asf.8 (revision 63ab6604)
1.\" Copyright (c) 2003 Greg Lehey.  All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\"
12.\" This software is provided by Greg Lehey ``as is'' and
13.\" any express or implied warranties, including, but not limited to, the
14.\" implied warranties of merchantability and fitness for a particular purpose
15.\" are disclaimed.  in no event shall Greg Lehey be liable
16.\" for any direct, indirect, incidental, special, exemplary, or consequential
17.\" damages (including, but not limited to, procurement of substitute goods
18.\" or services; loss of use, data, or profits; or business interruption)
19.\" however caused and on any theory of liability, whether in contract, strict
20.\" liability, or tort (including negligence or otherwise) arising in any way
21.\" out of the use of this software, even if advised of the possibility of
22.\" such damage.
23.\"
24.\" $DragonFly: src/usr.sbin/asf/asf.8,v 1.6 2008/09/02 11:50:46 matthias Exp $
25.\"
26.Dd February 21, 2009
27.Os
28.Dt ASF 8
29.Sh NAME
30.Nm asf
31.Nd add symbol files
32.Sh SYNOPSIS
33.Nm
34.Op Fl afk
35.Op Ar modules-path Op Ar outfile
36.Sh DESCRIPTION
37By default,
38.Nm
39reads
40.Xr kldstat 8
41output from standard input and writes to the
42.Pa .asf
43file a list of
44.Xr kgdb 1
45commands to add symbol files from KLDs in subdirectories of the subdirectory
46.Pa modules
47of the current directory, which is intended to be a kernel build directory.
48This allows
49.Xr kgdb 1
50to load the symbols into the debugging environment.
51.Pp
52If
53.Ar modules-path
54is specified,
55.Nm
56uses it for the modules directory instead of the default
57.Pa /boot/modules .
58This is useful when building in a non-standard location (i.e., not
59.Pa /usr/src
60and
61.Pa /usr/obj ) .
62.Pp
63If
64.Ar outfile
65is specified,
66.Nm
67writes to it instead of standard output.
68.Sh OPTIONS
69The following options modify the function of
70.Nm :
71.Bl -tag -width indent
72.It Fl a
73When writing to an explicit
74.Ar outfile ,
75append to the file rather than overwriting it.
76.It Fl f
77Instead of trying to simplistically guess the path for each module, perform
78a traversal in the same way that
79.Xr find 1
80does to locate an exact path for each module, no matter where in
81.Ar modules-path
82it is located.
83.It Fl k
84Instead of reading from standard input, start a
85.Xr kldstat 8
86and read the information from it.
87.El
88.Sh EXAMPLES
89The common usage on a
90.Dx
91system is sourcing the output of
92.Nm Fl k
93into
94.Xr kgdb 1 :
95.Bd -literal -offset indent
96# asf -k
97# [start kgdb...]
98(kgdb) source .asf
99.Ed
100.Sh SEE ALSO
101.Xr kgdb 1 ,
102.Xr kldstat 8
103.Sh HISTORY
104The
105.Nm
106utility first appeared in
107.Fx 5.2 .
108.Sh AUTHORS
109.An Greg Lehey Aq grog@FreeBSD.org
110.Sh BUGS
111It should be possible to write to an
112.Ar outfile
113without specifying a module path.
114