Merge from vendor branch GROFF:
[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.1 2004/06/18 21:20:55 hmp Exp $
26 .\"
27 .Dd June 18, 2004
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 afksx
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 .It Fl x
89 Normally
90 .Nm
91 looks for KLDs with names of the form
92 .Ao Ar module Ac Ns Pa .ko.debug .
93 The
94 .Fl x
95 option tells
96 .Nm
97 to look for KLDs with names of the form
98 .Ao Ar module Ac Ns Pa .ko .
99 .El
100 .Sh HISTORY
101 The
102 .Nm
103 utility first appeared in
104 .Fx 5.2 .
105 .Sh AUTHORS
106 .An Greg Lehey Aq grog@FreeBSD.org
107 .Sh BUGS
108 It should be possible to write to an
109 .Ar outfile
110 without specifying a module path.
111 .Sh SEE ALSO
112 .Xr gdb 1 ,
113 .Xr kldstat 8