
UDI Services
Universal Debugger Interface Specification
3-47
In general,
UDIWait
returns an error code only when it cannot determine the
true state of the target (an example might be
UDIErrorTargetNotResponding
). If
UDIWait
can determine the true state of
the target, it should instead return
UDINoError
and return the state in
StopReason
.
StopReason
is divided into two parts: the lower 8 bits indicate a
gross process state and the upper 24 bits indicate a fine process state. The
following table shows the gross
StopReasons
that are defined and their
meanings. Some
StopReasons
use the fine state field to return further
information and that is defined below as well.
StopReason
Meaning
UDIBreak
Breakpoint was hit. UDIBreak is returned
with the upper 24 bits indicating which
breakpoint was hit.
UDIExited
Program stopped executing because it exited
(or its equivalent). Upper 24 bits give the exit
code.
UDIHalted
CPU has halted. Fine state can be 0 or any
from the fine state table below. Target will
not leave UDIHalted state without DFE
intervention.
UDINotExecuting
If
UDIWait
is called before any calls to
UDIExecute
or
UDIStep
are made on a
connection, it returns
UDINotExecuting
as a
reason.
UDIRunning
CPU is running. Fine state can be 0 or any
from the fine state table below.
UDIStdoutReady
UDIStderrReady
UDIStdinNeeded
UDIStdinModeX
TIP needs to perform I/O (usually on behalf of
the program). Upper 24 bits indicate how
much output is needed, how much input can
be accepted, or what mode is desired
(whichever is applicable).
UDIStepped
Step count from the current
UDIStep
call
expired.
UDIStopped
Target stopped because DFE called
UDIStop.
UDITrapped
Invalid or unexpected trap was taken. Upper
24 bits of StopReason indicate which trap was