Contains classes and instances related to the description of data types.
The primary use of the classes in this module is to build the type
ty to the
methods, that allow to read a register or part of the memory as a specific
data type. For more information on reading as type, please refer to the
documentation of the
This module mainly defines primitive types (such as Bool, F32, U64) as well as type constructors, e.g. classes whose instances are a type.
context.read(address, USize), the actual length of the read will depend on whether the context is in 64 or in 32 bits mode.
FixedWidthIntegerallows to build any size of integers.
BigEndianaccept an integer type as a parameter, and forces its endianness to little or big.
Pointertakes a type T as a parameter, and returns type "pointer to T" (
T*in C speak). Its main use is with the
Arraytakes a type T and a count as parameters, and returns the type describing a contiguous array of T. T (
RawBufferis a specialized version of
CStringaccepts a maximum count N, and return the type that designates "NUL-terminated strings of a maximum size N"
methods accept a
context parameter (that defaults to
This parameter represents the current context of execution, and should
generally be of type
This parameter is necessary, because the size and value of certain types may depend on the context of execution. For instance, a Pointer is 8 bytes in a 64 bits context, and 4 bytes in a 32 bits context.
Generally, users of the API should not have to provide explicit values for the context parameter, as the methods of Type objects will be called by the context instance itself rather than directly by the user.
Some types are context-insensitive. This means that their properties will not be affected by the context value passed to the various methods of the type. For context-insensitive types, the is_context_sensitive method will return False, and you can pass any object as context parameter (even None).
|Module||_array||No module docstring; 2/2 classes documented|
|Module||_integer||No module docstring; 7/7 classes, 0/2 functions documented|
|Module||_pointer||No module docstring; 1/1 classes, 0/1 functions documented|
|Module||_string||No module docstring; 2/2 classes documented|
|Module||_type||No module docstring; 1/1 classes documented|