Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | list_typeclass |
struct | list_typeclass_size |
Atomic types are split into the various type classes
None < A default value and includes all types |
Definition in file typeclass.c.
Definition at line 299 of file typeclass.c.
References get_base_type_typeclass(), rz_list_append(), list_typeclass::typeclass, list_typeclass::typedb, list_typeclass::types, and v.
Referenced by rz_type_typeclass_get_all().
|
static |
Definition at line 319 of file typeclass.c.
References get_base_type_typeclass(), rz_list_append(), rz_base_type_t::size, list_typeclass_size::size, list_typeclass_size::typeclass, list_typeclass_size::typedb, list_typeclass_size::types, and v.
Referenced by rz_type_typeclass_get_all_sized().
|
inlinestatic |
Definition at line 123 of file typeclass.c.
References get_base_type_typeclass(), rz_return_val_if_fail, and type.
Referenced by rz_base_type_is_floating(), rz_base_type_is_integral_signed(), and rz_base_type_is_integral_unsigned().
|
inlinestatic |
Definition at line 132 of file typeclass.c.
References get_type_typeclass(), rz_return_val_if_fail, and type.
Referenced by rz_type_is_floating(), rz_type_is_integral_signed(), and rz_type_is_integral_unsigned().
|
inlinestatic |
Definition at line 85 of file typeclass.c.
References RZ_BASE_TYPE_KIND_TYPEDEF, rz_return_val_if_fail, RZ_TYPE_ATTRIBUTE_TYPECLASS_MASK, rz_type_db_get_base_type(), rz_type_identifier(), RZ_TYPE_KIND_IDENTIFIER, RZ_TYPE_TYPECLASS_INVALID, and type.
Referenced by base_type_typeclass_collect_cb(), base_type_typeclass_sized_collect_cb(), check_base_type_typeclass(), get_type_typeclass(), rz_base_type_is_integral(), rz_base_type_is_num(), and rz_base_type_typeclass().
|
inlinestatic |
Definition at line 110 of file typeclass.c.
References get_base_type_typeclass(), rz_return_val_if_fail, rz_type_db_get_base_type(), rz_type_identifier(), and type.
Referenced by check_type_typeclass(), rz_type_is_integral(), rz_type_is_num(), and rz_type_typeclass().
RZ_API bool rz_base_type_is_floating | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Checks if the RzBaseType is Floating typeclass.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 233 of file typeclass.c.
References check_base_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_FLOATING, and type.
RZ_API bool rz_base_type_is_integral | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Checks if the RzBaseType is Integral typeclass.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 203 of file typeclass.c.
References get_base_type_typeclass(), rz_return_val_if_fail, type, and typeclass_is_integal().
RZ_API bool rz_base_type_is_integral_signed | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Checks if the RzBaseType is Integral and Signed typeclass.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 255 of file typeclass.c.
References check_base_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, and type.
RZ_API bool rz_base_type_is_integral_unsigned | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Checks if the RzBaseType is Integral and Unsigned typeclass.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 277 of file typeclass.c.
References check_base_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED, and type.
RZ_API bool rz_base_type_is_num | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Checks if the RzBaseType is Num typeclass.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 173 of file typeclass.c.
References get_base_type_typeclass(), rz_return_val_if_fail, type, and typeclass_is_num().
RZ_API RzTypeTypeclass rz_base_type_typeclass | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzBaseType * | type | ||
) |
Gets the base type class.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 147 of file typeclass.c.
References get_base_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INVALID, and type.
Referenced by rz_type_integral_set_sign().
Checks if the RzType is Floating typeclass.
typedb | Type Database instance |
type | RzType type pointer |
Definition at line 244 of file typeclass.c.
References check_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_FLOATING, and type.
Checks if the RzType is Integral typeclass.
typedb | Type Database instance |
type | RzType type pointer |
Definition at line 218 of file typeclass.c.
References get_type_typeclass(), rz_return_val_if_fail, type, and typeclass_is_integal().
Referenced by rz_type_integral_set_sign(), var_type_set_sign(), and var_type_simple_to_complex().
Checks if the RzType is Integral and Signed typeclass.
typedb | Type Database instance |
type | RzType type pointer |
Definition at line 266 of file typeclass.c.
References check_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, and type.
RZ_API bool rz_type_is_integral_unsigned | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzType * | type | ||
) |
Checks if the RzType is Integral and Unsigned typeclass.
typedb | Type Database instance |
type | RzType type pointer |
Definition at line 288 of file typeclass.c.
References check_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED, and type.
Checks if the RzType is Num typeclass.
typedb | Type Database instance |
type | RzType type pointer |
Definition at line 188 of file typeclass.c.
References get_type_typeclass(), rz_return_val_if_fail, type, and typeclass_is_num().
RZ_API RzTypeTypeclass rz_type_typeclass | ( | const RzTypeDB * | typedb, |
RZ_NONNULL const RzType * | type | ||
) |
Gets the type class.
typedb | Type Database instance |
type | RzBaseType type pointer |
Definition at line 160 of file typeclass.c.
References get_type_typeclass(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INVALID, and type.
RZ_API RZ_BORROW const char* rz_type_typeclass_as_string | ( | RzTypeTypeclass | typeclass | ) |
Returns the string representation of a typeclass.
typeclass | A typeclass |
Definition at line 39 of file typeclass.c.
References RZ_TYPE_TYPECLASS_ADDRESS, RZ_TYPE_TYPECLASS_FLOATING, RZ_TYPE_TYPECLASS_INTEGRAL, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED, RZ_TYPE_TYPECLASS_NONE, RZ_TYPE_TYPECLASS_NUM, and rz_warn_if_reached.
Referenced by save_atomic_type().
RZ_API RzTypeTypeclass rz_type_typeclass_from_string | ( | RZ_NONNULL const char * | typeclass | ) |
Returns the typeclass from the string name of it.
typeclass | A typeclass name |
Definition at line 66 of file typeclass.c.
References rz_return_val_if_fail, RZ_STR_ISNOTEMPTY, RZ_TYPE_TYPECLASS_ADDRESS, RZ_TYPE_TYPECLASS_FLOATING, RZ_TYPE_TYPECLASS_INTEGRAL, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED, RZ_TYPE_TYPECLASS_NONE, and RZ_TYPE_TYPECLASS_NUM.
Referenced by get_atomic_type().
RZ_API RZ_OWN RzList* rz_type_typeclass_get_all | ( | const RzTypeDB * | typedb, |
RzTypeTypeclass | typeclass | ||
) |
Returns the list of all base types given the typeclass.
typedb | Type Database instance |
typeclass | typeclass (cannot be None) |
Definition at line 338 of file typeclass.c.
References base_type_typeclass_collect_cb(), lt, NULL, rz_list_new(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INVALID, RZ_TYPE_TYPECLASS_NONE, list_typeclass::typeclass, list_typeclass_size::typeclass, list_typeclass::typedb, list_typeclass_size::typedb, types, and rz_type_db_t::types.
RZ_API RZ_OWN RzList* rz_type_typeclass_get_all_sized | ( | const RzTypeDB * | typedb, |
RzTypeTypeclass | typeclass, | ||
size_t | size | ||
) |
Returns the list of all base types given the typeclass and size.
typedb | Type Database instance |
typeclass | typeclass (cannot be None) |
size | The bitsize of a type to select from |
Definition at line 354 of file typeclass.c.
References base_type_typeclass_sized_collect_cb(), lt, NULL, rz_list_new(), rz_return_val_if_fail, RZ_TYPE_TYPECLASS_INVALID, RZ_TYPE_TYPECLASS_NONE, list_typeclass::typeclass, list_typeclass_size::typeclass, list_typeclass::typedb, list_typeclass_size::typedb, types, and rz_type_db_t::types.
Referenced by rz_type_typeclass_get_default_sized().
RZ_API RZ_OWN RzBaseType* rz_type_typeclass_get_default_sized | ( | const RzTypeDB * | typedb, |
RzTypeTypeclass | typeclass, | ||
size_t | size | ||
) |
Returns the default base type given the typeclass and size.
typedb | Type Database instance |
typeclass | typeclass (cannot be None) |
size | The bitsize of a type to select from |
Definition at line 370 of file typeclass.c.
References NULL, rz_list_free(), rz_list_pop(), rz_return_val_if_fail, rz_type_typeclass_get_all_sized(), RZ_TYPE_TYPECLASS_INVALID, RZ_TYPE_TYPECLASS_NONE, list_typeclass_size::typeclass, and list_typeclass_size::typedb.
Referenced by rz_type_integral_set_sign().
|
inlinestatic |
Definition at line 30 of file typeclass.c.
References RZ_TYPE_TYPECLASS_ADDRESS, RZ_TYPE_TYPECLASS_INTEGRAL, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, and RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED.
Referenced by rz_base_type_is_integral(), and rz_type_is_integral().
|
inlinestatic |
Definition at line 26 of file typeclass.c.
References RZ_TYPE_TYPECLASS_ADDRESS, RZ_TYPE_TYPECLASS_FLOATING, RZ_TYPE_TYPECLASS_INTEGRAL, RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED, RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED, and RZ_TYPE_TYPECLASS_NUM.
Referenced by rz_base_type_is_num(), and rz_type_is_num().