xref: /dragonfly/usr.sbin/asf/asf.8 (revision 19fe1c42)
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.6 2008/09/02 11:50:46 matthias Exp $
26.\"
27.Dd September 2, 2008
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 afk
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 /boot/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.El
87.Sh EXAMPLES
88The common usage on a
89.Dx
90system would probably be cut-and-pasting the output of
91.Xr gdb 1
92.Bd -literal -offset indent
93(kgdb) kldstat
94.Ed
95.Pp
96into
97.Nm
98and then issuing a
99.Bd -literal -offset indent
100(kgdb) source .asf
101.Ed
102.Sh SEE ALSO
103.Xr gdb 1 ,
104.Xr kldstat 8
105.Sh HISTORY
106The
107.Nm
108utility first appeared in
109.Fx 5.2 .
110.Sh AUTHORS
111.An Greg Lehey Aq grog@FreeBSD.org
112.Sh BUGS
113It should be possible to write to an
114.Ar outfile
115without specifying a module path.
116