
UDI Services
3-46
Universal Debugger Interface Specification
UDIWait
Call
UDIError UDIWait (
UDIInt32
UDIPId *
UDIUInt32 *
);
MaxTime,
PId,
StopReason
/* In */
/* Out */
/* Out */
Description
UDIWait
returns when either the target’s state changes or when approximately
MaxTime
milliseconds have elapsed. If
MaxTime
is the special value
UDIWaitForever
, then
UDIWait
returns only when the target’s state changes.
UDIWait
returns the state of the target in
StopReason
. When
UDIWait
returns
any
StopReason
other than
UDIRunning
, then the process that stopped is
returned in
PId
and this process also becomes the “current process” for the
connection.
The TIP must return immediately from
UDIWait
(without waiting for the
expiration of the
MaxTime
parameter timer) for the following conditions:
If the gross state is not
UDIRunning
.
If the
StopReason
(combination of gross state and fine state) has changed
since the last
UDIWait
return—with the exception that if the state change
has been from (
not
UDIRunning
+ fine state anything) to (
UDIRunning
+
fine state 0). The logic here is that the transition from (
not
UDIRunning
)
to
UDIRunning
can only come from a DFE action (for example,
UDIExecute
) and that (
UDIRunning
+ fine state 0) would be the next
expected state anyway.
If
UDIWait
is called before any calls to
UDIExecute
or
UDIStep
are made, it
returns
UDINotExecuting
as a reason..
For some TIPs (for example, a simulator TIP on a DOS host), all actual target
execution progress occurs when the DFE calls
UDIWait
. Consequently, a DFE
may not assume that any progress has been made by the sequence:
UDIExecute
, long pause,
UDIStop
(and a DFE must call
UDIWait
to ensure
progress).