
UDI Services
Universal Debugger Interface Specification
3-23
UDIFind
Call
UDIError UDIFind (
UDIMemoryRange
UDIInt32
UDIHostMemPtr
UDIHostMemPtr
UDICount
UDISizeT
UDIBool
UDICount
UDICount *
CPUOffset
UDIHostMemPtr
);
WhereToLook,
Stride,
Pattern,
PatternMask,
PatternCount,
PatternSize,
PatternHostEndian,
MaxToFind,
CountFound,
FoundAtOffset[]
FoundValues[]
/* In */
/* In */
/* In */
/* In */
/* In */
/* In */
/* In */
/* In */
/* Out */
/* Out */
/* Out */
Description
UDIFind
is used to find one or more occurrences of a specified pattern in a
specified
UDIMemoryRange
. The DFE specifies the memory range to search, a
Pattern
, and the maximum occurrences to report. The pattern consists of
PatternCount
objects, each of size
PatternSize
and an endian type of
PatternHostEndian
. (The pattern may be further qualified by a
PatternMask
,
such that a match is found only if, for each object in the pattern:
TargetMem
&
PatternMask
==
Pattern
&
PatternMask
). A
PatternMask
of NULL
indicates no masking, i.e., it is equivalent to a
PatternMask
whose bits are all
ones.
The
Stride
parameter specifies how much to move the target offset pointer for
each step of the search (this will usually be the same as
PatternSize
). When
Stride
is negative, a reverse search over the
WhereToLook
range is specified.
The TIP always reports the number of matches found and the offsets at which
they were found. If the
PatternMask
is not null, the TIP also reports the actual
data that was found at the offsets. Using the
FoundAtOffset
and
FoundValues
arrays, the DFE is responsible for ensuring that the
FoundAtOffset
and
FoundValues
buffers are large enough to hold
MaxToFind
answers. The data
returned in
FoundValues
if of endian type
PatternHostEndian
.
Return Codes
UDIErrorUnknownResourceSpace
UDIErrorInvalidResource