Annotation of src/usr.bin/pmdb/pmdb.1, Revision 1.6
1.6 ! espie 1: .\" $OpenBSD: pmdb.1,v 1.5 2002/03/15 18:04:41 art Exp $
1.1 art 2: .\"
3: .\" Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
4: .\" All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\"
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. The name of the author may not be used to endorse or promote products
13: .\" derived from this software without specific prior written permission.
14: .\"
15: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
16: .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17: .\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
18: .\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19: .\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20: .\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21: .\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22: .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23: .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24: .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25: .\"
26: .Dd Feb 20, 2002
27: .Dt PMDB 1
28: .Os
29: .Sh NAME
30: .Nm pmdb
31: .Nd debugger.
32: .Sh SYNOPSIS
33: .Nm pmdb
34: .Ar program Op Ar ...
35: .Sh DESCRIPTION
36: The
37: .Nm
38: utility can be used to see what is happening inside a running process or
39: to catch program crashes and examine the state at the time of the crash.
40: The only way to start
41: .Nm
1.6 ! espie 42: at this moment is to specify the name of the program to be debugged and all
1.1 art 43: its arguments on the command line.
44: The program is controlled from a command line which usually gives the
45: prompt "pmdb>".
46: .Sh PROCESS STATES
47: A loaded program can be in one of three possible states:
48: .Bl -tag -width RUNNING
49: .It LOADED
50: This is the initial state.
51: The program is not running, it can't be examined (because it doesn't have
52: any state).
53: The only thing that can be done to the process is to start it with the
54: .Ic run
55: command.
56: .It RUNNING
57: When a process is
58: .Ic RUNNING ,
59: the only way to affect it is through signals sent to it.
60: Unless a signal is ignored with the
61: .Ic signal ignore
1.6 ! espie 62: command, it will be catched by
! 63: .Nm
! 64: and the process will go into the
1.1 art 65: .Ic STOPPED
66: state.
67: .It STOPPED
68: A stopped process can be examined, changed and restarted with the
69: .Ic continue
70: command.
71: .El
72: .Sh COMMANDS
73: .Bl -tag -width continue
74: .It regs
75: Show the contents of the processor registers at the moment the process was
76: .Ic STOPPED .
77: .It trace
78: Show the function call trace of the currently
79: .Ic STOPPED
80: process.
81: .It run
82: Start running a
83: .Ic LOADED
84: process.
85: .It continue
86: Continue a
87: .Ic STOPPED
88: process.
89: .It kill
90: Unconditionally kills the debugged process and puts it in the
91: .Ic LOADED
92: state.
93: .It signal Ar ignore|stop Ar signum|signame
94: Sets the signal state for the specified signal to either ignore it and
95: pass it to the process or to stop the process.
96: .It sigstate
97: Shows which signals are currently ignored.
1.3 art 98: .It break Ar symname|addr
99: Sets a breakpoint at the symbol
100: .Ar symname
101: or the numerical address
102: .Ar addr .
103: .It step
104: Resumes execution just like
105: .Ic continue ,
106: but stops it again as soon as possible after executing at least
107: one instruction.
1.5 art 108: .It sym_load Ar fname Ar offs
109: Loads a symbol table from the file
110: .Ar fname
111: at the offset
112: .Ar offs .
1.1 art 113: .It help
114: Shows a short help.
115: .It quit
116: Kills the process (if necessary) and exits
117: .Nm .
118: .It exit
119: Alias for
120: .Ic quit .
121: .El
1.4 art 122: .Sh BUGS
123: The command syntax is really poor and ad hoc at this moment. Most of the
124: command names and arguments will change as soon as the command line interface
125: is replaced.
1.1 art 126: .Sh HISTORY
127: The
128: .Nm
129: debugger was written because the author believed that
130: .Xr gdb 1
1.6 ! espie 131: was too bloated and hairy to run on OpenBSD/sparc64.