
UDI Services
3-54
Universal Debugger Interface Specification
If the expression evaluates to a value or a set of values,
KindOfAnswer
is set to
UDIExprKindValue
and the values are returned in
AnswerBuf
. (The
AnswerResource
parameter is not used in this case.)
CountDone
indicates the
number of values returned,
Size
indicates the size of each value in bytes, and
Type
contains simple type information for the expression. The endian type of
the objects is always host–endian (i.e. the data is in host byte order). Note that
the DFE is constrained to return a single
Size
descriptor. Thus, while arrays of
scalar values could be returned, structures which mixed size fields could not.
The
Type
information returned is fairly basic, being one of the following:
UDITypeUnknown
/* type not applicable, or DFE doesn’t
* support types */
/* type is known but does not match one
UDITypeOther
in
UDITypeChar
UDITypeInt
* the UDI list */
/* an 8-bit ASCII character */
/* an integral type. With Size, handles
* short, int, long */
/* with Size, handles float, double, long
* double */
UDITypeFloat
If
BufSize
was not big enough to hold the values, (i.e.
CountDone
*
Size
>
BufSize
), the DFE leaves the buffer unfilled and returns the error
UDIDFEErrorBufTooSmall
but still sets
CountDone
,
Size
, and
Type
as if the
buffer had been big enough. This allows the TIP to reissue the request with a
large enough buffer if it so desires.
If the expression evaluates to an “address,”
KindofAnswer
is set to
UDIExprKindResource
and the resource description (class and offset) is
returned in
AnswerResource
. (The
AnswerBuf
parameter is not used in this
case). If the DFE knows the type of the data that the address is pointing at, it
should set
Type
,
Count
, and
Size
appropriately. If the DFE does not know the
type, size, or count of the data that the address is pointing at, it can return:
Type
=
UDITypeUnknown
and
Count
or
Size
= 0.
Return Codes
UDIDFEErrorCouldNotEvaluate
UDIDFEErrorEvaluatedToValue
(This could happen if the supplied
AnswerBuf was NULL.)
UDIDFEErrorEvaluatedToResource
(This could happen if the supplied
AnswerResource was NULL.)
UDIDFEErrorBufTooSmall