[BACK]Return to pmdb.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / pmdb

File: [local] / src / usr.bin / pmdb / Attic / pmdb.1 (download)

Revision 1.6, Mon Mar 18 17:13:31 2002 UTC (22 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.5: +6 -4 lines

typos.

.\"	$OpenBSD: pmdb.1,v 1.6 2002/03/18 17:13:31 espie Exp $
.\"
.\" Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
.\" All rights reserved. 
.\"
.\" Redistribution and use in source and binary forms, with or without 
.\" modification, are permitted provided that the following conditions 
.\" are met: 
.\"
.\" 1. Redistributions of source code must retain the above copyright 
.\"    notice, this list of conditions and the following disclaimer. 
.\" 2. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission. 
.\"
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
.\" EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
.\"
.Dd Feb 20, 2002
.Dt PMDB 1
.Os
.Sh NAME
.Nm pmdb
.Nd debugger.
.Sh SYNOPSIS
.Nm pmdb
.Ar program Op Ar ...
.Sh DESCRIPTION
The
.Nm
utility can be used to see what is happening inside a running process or
to catch program crashes and examine the state at the time of the crash.
The only way to start
.Nm
at this moment is to specify the name of the program to be debugged and all
its arguments on the command line.
The program is controlled from a command line which usually gives the
prompt "pmdb>".
.Sh PROCESS STATES
A loaded program can be in one of three possible states:
.Bl -tag -width RUNNING
.It LOADED
This is the initial state.
The program is not running, it can't be examined (because it doesn't have
any state).
The only thing that can be done to the process is to start it with the
.Ic run
command.
.It RUNNING
When a process is
.Ic RUNNING ,
the only way to affect it is through signals sent to it.
Unless a signal is ignored with the
.Ic signal ignore
command, it will be catched by
.Nm 
and the process will go into the
.Ic STOPPED
state.
.It STOPPED
A stopped process can be examined, changed and restarted with the
.Ic continue
command.
.El
.Sh COMMANDS
.Bl -tag -width continue
.It regs
Show the contents of the processor registers at the moment the process was
.Ic STOPPED .
.It trace
Show the function call trace of the currently
.Ic STOPPED
process.
.It run
Start running a
.Ic LOADED
process.
.It continue
Continue a
.Ic STOPPED
process.
.It kill
Unconditionally kills the debugged process and puts it in the
.Ic LOADED
state.
.It signal Ar ignore|stop Ar signum|signame
Sets the signal state for the specified signal to either ignore it and
pass it to the process or to stop the process.
.It sigstate
Shows which signals are currently ignored.
.It break Ar symname|addr
Sets a breakpoint at the symbol
.Ar symname
or the numerical address
.Ar addr .
.It step
Resumes execution just like
.Ic continue ,
but stops it again as soon as possible after executing at least
one instruction.
.It sym_load Ar fname Ar offs
Loads a symbol table from the file
.Ar fname
at the offset
.Ar offs .
.It help
Shows a short help.
.It quit
Kills the process (if necessary) and exits
.Nm .
.It exit
Alias for
.Ic quit .
.El
.Sh BUGS
The command syntax is really poor and ad hoc at this moment. Most of the
command names and arguments will change as soon as the command line interface
is replaced.
.Sh HISTORY
The
.Nm
debugger was written because the author believed that
.Xr gdb 1
was too bloated and hairy to run on OpenBSD/sparc64.