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