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