xref: /dragonfly/usr.sbin/asf/asf.8 (revision 9348a738)
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.Dd December 12, 2014
25.Dt ASF 8
26.Os
27.Sh NAME
28.Nm asf
29.Nd add symbol files
30.Sh SYNOPSIS
31.Nm
32.Op Fl afk
33.Op Ar modules-path Op Ar outfile
34.Sh DESCRIPTION
35By default,
36.Nm
37reads
38.Xr kldstat 8
39output from standard input and writes to the
40.Pa .asf
41file a list of
42.Xr kgdb 1
43commands to add symbol files from KLDs in subdirectories of the subdirectory
44.Pa modules
45of the current directory, which is intended to be a kernel build directory.
46This allows
47.Xr kgdb 1
48to load the symbols into the debugging environment.
49.Pp
50If
51.Ar modules-path
52is specified,
53.Nm
54uses it for the modules directory instead of the default
55.Pa /boot/kernel .
56This is useful when building in a non-standard location (i.e., not
57.Pa /usr/src
58and
59.Pa /usr/obj ) .
60.Pp
61If
62.Ar outfile
63is specified,
64.Nm
65writes to it instead of standard output.
66.Sh OPTIONS
67The following options modify the function of
68.Nm :
69.Bl -tag -width indent
70.It Fl a
71When writing to an explicit
72.Ar outfile ,
73append to the file rather than overwriting it.
74.It Fl f
75Instead of trying to simplistically guess the path for each module, perform
76a traversal in the same way that
77.Xr find 1
78does to locate an exact path for each module, no matter where in
79.Ar modules-path
80it is located.
81.It Fl k
82Instead of reading from standard input, start a
83.Xr kldstat 8
84and read the information from it.
85.El
86.Sh EXAMPLES
87The common usage on a
88.Dx
89system is sourcing the output of
90.Nm Fl k
91into
92.Xr kgdb 1 :
93.Bd -literal -offset indent
94# asf -k
95# [start kgdb...]
96(kgdb) source .asf
97.Ed
98.Sh SEE ALSO
99.Xr kgdb 1 ,
100.Xr kldstat 8
101.Sh HISTORY
102The
103.Nm
104utility first appeared in
105.Fx 5.2 .
106.Sh AUTHORS
107.An Greg Lehey Aq Mt grog@FreeBSD.org
108.Sh BUGS
109It should be possible to write to an
110.Ar outfile
111without specifying a module path.
112