Type related functions and class.
More...
Type related functions and class.
◆ type_source_t
Type source (where the type information comes from)
Enumerator |
---|
GUESSED_NONE | |
GUESSED_WEAK | |
GUESSED_FUNC | |
GUESSED_DATA | |
TS_NOELL | |
TS_SHRINK | |
TS_DONTREF | |
TS_MASK | |
◆ dstr()
const char * dstr |
( |
const tinfo_t * | tif | ) |
|
|
inline |
Print the specified type info.
This function can be used from a debugger by typing "tif->dstr()"
◆ is_type_correct()
Verify a type string.
- Returns
- true if type string is correct
◆ is_small_udt()
Is a small structure or union?
- Returns
- true if the type is a small UDT (user defined type). Small UDTs fit into a register (or pair or registers) as a rule.
◆ is_nonbool_type()
Is definitely a non-boolean type?
- Returns
- true if the type is a non-boolean type (non bool and well defined)
◆ is_bool_type()
Is a boolean type?
- Returns
- true if the type is a boolean type
◆ is_ptr_or_array()
Is a pointer or array type?
◆ is_paf()
Is a pointer, array, or function type?
◆ is_inplace_def()
THREAD_SAFE bool is_inplace_def |
( |
const tinfo_t & | type | ) |
|
|
inline |
Is struct/union/enum definition (not declaration)?
◆ partial_type_num()
int partial_type_num |
( |
const tinfo_t & | type | ) |
|
|
inline |
Calculate number of partial subtypes.
- Returns
- number of partial subtypes. The bigger is this number, the uglier is the type.
◆ get_float_type()
tinfo_t get_float_type |
( |
int | width | ) |
|
|
inline |
Get a type of a floating point value with the specified width.
- Returns
- type info object
- Parameters
-
width | width of the desired type |
◆ get_int_type_by_width_and_sign()
Create a type info by width and sign.
Returns a simple type (examples: int, short) with the given width and sign.
- Parameters
-
srcwidth | size of the type in bytes |
sign | sign of the type |
◆ get_unk_type()
Create a partial type info by width.
Returns a partially defined type (examples: _DWORD, _BYTE) with the given width.
- Parameters
-
size | size of the type in bytes |
◆ dummy_ptrtype()
Generate a dummy pointer type.
- Parameters
-
ptrsize | size of pointed object |
isfp | is floating point object? |
◆ make_pointer()
Create a pointer type.
This function performs the following conversion: "type" -> "type*"
- Parameters
-
- Returns
- "type*". for example, if 'char' is passed as the argument,
◆ create_typedef() [1/2]
tinfo_t create_typedef |
( |
const char * | name | ) |
|
|
inline |
Create a reference to a named type.
- Parameters
-
- Returns
- type which refers to the specified name. For example, if name is "DWORD", the type info which refers to "DWORD" is created.
◆ create_typedef() [2/2]
Create a reference to an ordinal type.
- Parameters
-
n | ordinal number of the type |
- Returns
- type which refers to the specified ordinal. For example, if n is 1, the type info which refers to ordinal type 1 is created.
◆ get_type()
Get a global type.
Global types are types of addressable objects and struct/union/enum types
- Parameters
-
id | address or id of the object |
tif | buffer for the answer |
guess | what kind of types to consider |
- Returns
- success
◆ set_type()
Set a global type.
- Parameters
-
id | address or id of the object |
tif | new type info |
source | where the type comes from |
force | true means to set the type as is, false means to merge the new type with the possibly existing old type info. |
- Returns
- success