1.\"	$NetBSD: dbsym.8,v 1.1 2009/08/18 20:22:20 skrll Exp $
2.\"
3.Dd November 9, 2001
4.Dt DBSYM 8
5.Os
6.Sh NAME
7.Nm dbsym
8.Nd copy kernel symbol table into db_symtab space
9.Sh SYNOPSIS
10.Nm
11.Op Fl v
12.Op Fl b Ar bfdname
13.Ar kernel
14.Sh DESCRIPTION
15.Nm
16is used to copy the symbol table in a newly linked kernel into the
17.Va db_symtab
18array (in the data section) so that the
19.Xr ddb 4
20kernel debugger can find the symbols.  This program is only used
21on systems for which the boot program does not load the symbol table
22into memory with the kernel.  The space for these symbols is
23reserved in the data segment using a config option like:
24.Pp
25.Li options		SYMTAB_SPACE=72000
26.Pp
27The size of the db_symtab array (the value of SYMTAB_SPACE) must be
28at least as large as the kernel symbol table.  If insufficient space
29is reserved, dbsym will refuse to copy the symbol table.
30.Pp
31To recognize kernel executable format, the
32.Fl b
33flag specifies BFD name of kernel.
34.Pp
35If the
36.Fl v
37flag is given,
38.Nm
39will print out status information as
40it is copying the symbol table.
41.Pp
42Note that debugging symbols are not useful to the
43.Xr ddb 4
44kernel debugger, so to minimize the size of the kernel, one should
45either compile the kernel without debugging symbols (no
46.Fl g
47flag) or use the
48.Xr strip 1
49command to strip debugging symbols from the kernel before
50.Nm
51is used to copy the symbol table.  The command
52.Pp
53.Li strip -d netbsd
54.Pp
55will strip out debugging symbols.
56.Sh SEE ALSO
57.Xr strip 1 ,
58.Xr ddb 4
59