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