Debug Tutorial: How to View Process State
Command syntax:
process [ context ] [ change ] [ full ]
Process states fall into two general catergories, running and stopped.
Many commands cannot act upon a process in a running state and will print
an error if this is attempted. The halt command can be used to put
a process into a stopped state so that it can be examined.
- process lists the state of all processes in the context. Any
process in a stopped state includes its current location and the reason it
stopped. An '*' to the left of the context column indicates a state
change since the last time that process's state was displayed.
(The '>' currently has no meaning.)
- A program which has been loaded is automatically executed to the first line
of user code and placed in the Initial state.
- A program is automatically stopped just prior to executing the exit
procedure and placed in the Exiting state. Any process continued
past this point enters the Exited state and is no longer valid.
- Running states consist of Executing and Stepping. A
program executing a blocking receive will be in one of these states.
- The halt command stops execution and places the process in the
Interrupted state.
- A process which just completed a next, step, nexti, or stepi command
will be in the Stepped state.
- A process which encountered a code or data breakpoint will be in
the Breakpoint state. The number of the breakpoint encountered is
included in the reason field.
- A process for which a signal has arrived is placed in the Signaled
state. The name of the signal is included in the reason field. The signal
handler (default or user-defined) will not be executed until execution is
resumed.
- The change switch causes only processes' with a state change to be
displayed. The full switch causes a procedure name to be fully
qualified.
- The step, next, and wait commands automatically
display process state when they complete.
Example process state display:
Context State Reason Location Procedure
====================== ============ ========= ========== ====================
> (0) Initial Line 16 main()
> (1,3) Stepped 0x0003b410 _doprnt()
>*(2) Stepped Line 19 main()
> (4) Breakpoint C Bp2 Line 20 main()
>*(5) Signaled SIGSEGV Line 13 one()