4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
22 .\" Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25 .TH rdb 1 "24 April 2008"
27 rdb \- run-time demo debugger
34 executable [executable arguments ...]
40 is a simple general purpose debugger built on top of
45 is distributed is source code format and is a sample
48 interface and is not meant to be used in a production environment.
52 will debug a single process. In order to start debugging the process
53 again from the beginning
59 file containing a list of commands to be executed by rdb. This option
65 by default reads commands from standard input and displays responses on the
68 is terminated when it reads an EOF on input.
73 .BI break " [address]"
74 Set a break point at address. If no address is specified then list
75 all currently set breakpoints.
78 Continue execution of the debugged process. Note that when rdb
79 is first invoked it halts the program before it starts to run. To
80 start executing it you must use cont.
83 delete the breakpoint at address.
86 Prints a string to standard output. The string must be surrounded
90 To enable or disable the printing of event information to standard output.
95 events and print a message to standard output as they occur.
100 to load the current link-maps via the
102 interface. No information is printed.
105 display current link-map information.
108 display memory mapping information.
111 Set object padding to
113 bytes for objects mmap()'ed in by
115 object padding will only effect the loading of new objects,
116 those already loaded in memory are not effected.
119 enables and disables the skipping over of procedure linkage table entries
120 when stepping through a function call.
122 .BI print " {address [count [format]]|varname}"
123 displays data stored at
125 or register information. Type 'help print' from within rdb for more
128 .BI step " [count [silent]]"
131 instructions. If count is not given then signle step 1 instruction. If
132 the keyword silent is specified then do not dis-assemble the instructions
135 .BI value " symbol_name"
136 display the value (address) associated with a symbol
139 display a stack trace
141 A simple example showing how to load a program, set a break point
142 at main, and to then display the link-maps of all objects loaded:
146 polyslo 310% rdb /usr/bin/ls
147 parent: 28300 child: 28301 child procname: /proc/28301
149 break point set at: 0x11110
151 break point reached at addr: 0x11110
155 link-map: id: 0x0 name: /usr/bin/ls
156 base: 0x00010000 padd_base: 0xeffffa7c
157 data_base: 0x00000000
158 end: 0x00010000 padd_end: 0x00023ad0
159 link-map: id: 0x0 name: /usr/lib/libc.so.1(/usr/platform/$PLATFORM/lib/libc_psr.so.1)
160 base: 0xef700000 padd_base: 0xef7f131c
161 data_base: 0x00000000
162 end: 0xef700000 padd_end: 0xef7991cc
163 link-map: id: 0x0 name: /usr/lib/libdl.so.1(/usr/lib/ld.so.1)
164 base: 0xef7c0000 padd_base: 0xef7f1478
165 data_base: 0x00000000
166 end: 0xef7c0000 padd_end: 0xef7c0074
167 link-map: id: 0x0 name: /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
168 base: 0xef6f0000 padd_base: 0xef7f15bc
169 data_base: 0x00000000
170 end: 0xef6f0000 padd_end: 0xef6f0074
171 link-map: id: 0x1 name: /usr/lib/ld.so.1
172 base: 0xef7d0000 padd_base: 0xef7d1375
173 data_base: 0x00000000
174 end: 0xef7d0000 padd_end: 0xef7f01f8
176 Makefile gram.h m_utils.c rdb regs.c
177 gram.c lex.c objs rdb_mach.h