pmdb - debugger
pmdb [-c core] [-p pid] program [...]
The pmdb utility can be used to see what is happening inside
process or to catch program crashes and examine the state at
the time of
the crash. The only way to start pmdb at this moment is to
name of the program to be debugged and all its arguments on
line. Optionally, -c can be used to specify a core file to
is also possible to debug a process that is already running
the process's PID to the -p flag. This causes the process
to be put in
STOPPED state until execution is resumed either by an explicit command to
pmdb or by exiting pmdb. The program is controlled from a
which usually gives the prompt "pmdb>".
A loaded program can be in one of three possible states:
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 run command.
RUNNING When a process is RUNNING, the only way to affect
it is through
signals sent to it. Unless a signal is ignored
with the signal
ignore command, it will be caught by pmdb and the
go into the STOPPED state.
STOPPED A stopped process can be examined, changed and
the continue command.
Fetch and display in hex a word at address or
regs Show the contents of the processor registers
at the moment
the process was STOPPED.
trace Show the function call trace of the currently
run Start running a LOADED process.
continue Continue a STOPPED process.
kill Unconditionally kills the debugged process and
puts it in
the LOADED state.
signal ignore|stop signum|signame
Sets the signal state for the specified signal
ignore it and pass it to the process or to
stop the process.
sigstate Shows which signals are currently ignored.
setenv var val
Sets the environment variable var to the value
Sets a breakpoint at the symbol symname or the
step Resumes execution just like continue, but
stops it again as
soon as possible after executing at least one
sym_load fname offs
Loads a symbol table from the file fname at
help Shows a short help.
quit Kills the process (if necessary) and exits.
exit Alias for quit.
The pmdb debugger was written because the author believed
that gdb(1) was
too bloated and hairy to run on OpenBSD/sparc64.
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
OpenBSD 3.6 February 20, 2002
[ Back ]