23 type->identifier.is_const = is_const;
24 switch (btype->kind) {
74 type->pointer.type = t;
75 type->pointer.is_const = is_const;
113 newtype->
pointer.is_const = is_const;
135 type->array.type = t;
193 if (!btyp1 || !btyp2) {
216 if (!btyp1 || !btyp2) {
237 return !strcmp(
type->identifier.name,
"void");
251 return type->identifier.is_const;
265 return type->pointer.is_const;
542 default:
return false;
562 default:
return false;
RZ_API RZ_BORROW RzBaseType * rz_type_db_get_base_type(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzBaseType in the types database given the name.
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
RZ_API bool rz_type_is_identifier(RZ_NONNULL const RzType *type)
Checks if the RzType is identifier.
RZ_API bool rz_type_is_char_ptr_nested(RZ_NONNULL const RzType *type)
Checks if the pointer RzType is a nested pointer of string ("char **", "char ***",...
static bool type_is_atomic_ptr(RZ_NONNULL const RzType *type, RZ_NONNULL const char *name)
RZ_API RZ_OWN RzType * rz_type_pointer_of_base_type_str(const RzTypeDB *typedb, RZ_NONNULL const char *name, bool is_const)
Creates a new pointer RzType from the given RzBaseType name.
RZ_API bool rz_type_is_void_ptr_nested(RZ_NONNULL const RzType *type)
Checks if the pointer RzType is a nested abstract pointer ("void **", "vpod ***", etc)
RZ_API RzTypeCond rz_type_cond_invert(RzTypeCond cond)
return the inverted condition
RZ_API bool rz_type_atomic_str_eq(const RzTypeDB *typedb, RZ_NONNULL const RzType *typ1, RZ_NONNULL const char *name)
Checks if two atomic types (RzType and RzBaseType) are equivalent.
RZ_API bool rz_type_pointer_is_const(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the pointer RzType is "const".
RZ_API bool rz_type_is_strictly_atomic(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is strictly atomic.
RZ_API RZ_OWN RzType * rz_type_identifier_of_base_type(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, bool is_const)
Creates a new RzType indentifier from the given RzBaseType.
RZ_API RZ_BORROW const char * rz_type_cond_tostring(RzTypeCond cc)
RzTypeCond enum to string.
RZ_API RZ_OWN RzType * rz_type_array_of_base_type(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, size_t count)
Creates a new array RzType from the given RzBaseType.
RZ_API bool rz_type_is_atomic(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is atomic or derivative of it.
RZ_API bool rz_type_is_void_ptr(RZ_NONNULL const RzType *type)
Checks if the pointer RzType is abstract pointer ("void *")
RZ_API RZ_OWN RzType * rz_type_pointer_of_base_type(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, bool is_const)
Creates a new pointer RzType from the given RzBaseType.
RZ_API RZ_OWN RzType * rz_type_array_of_type(const RzTypeDB *typedb, RZ_NONNULL RzType *type, size_t count)
Creates a new array RzType from the given RzType.
static bool type_is_atomic_ptr_nested(RZ_NONNULL const RzType *type, RZ_NONNULL const char *name)
RZ_API bool rz_type_atomic_is_const(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the atomic RzType is "const".
RZ_API RZ_OWN RzType * rz_type_array_of_base_type_str(const RzTypeDB *typedb, RZ_NONNULL const char *name, size_t count)
Creates a new array RzType from the given RzBaseType name.
RZ_API bool rz_type_is_default(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is default.
RZ_API RZ_OWN RzType * rz_type_new_default(const RzTypeDB *typedb)
Creates a new instance of the default RzType type.
RZ_API RZ_OWN RzType * rz_type_pointer_of_type(const RzTypeDB *typedb, RZ_NONNULL RzType *type, bool is_const)
Creates a new pointer RzType from the given RzType.
RZ_API bool rz_type_atomic_is_void(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is "void".
RZ_API bool rz_type_cond_eval_single(RzTypeCond cond, st64 arg0)
Same as rz_type_cond_eval, but it assumes arg1 to be 0.
RZ_API bool rz_type_is_char_ptr(RZ_NONNULL const RzType *type)
Checks if the pointer RzType is a string ("char *" or "const char *")
RZ_API bool rz_type_integral_set_sign(const RzTypeDB *typedb, RZ_NONNULL RzType **type, bool sign)
If the type is unsigned it sets the sign.
RZ_API bool rz_type_cond_eval(RzTypeCond cond, st64 arg0, st64 arg1)
evaluate the type condition on the arguments and return a bool accordingly.
RZ_API RZ_OWN RzType * rz_type_identifier_of_base_type_str(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Creates a new RzType indentifier from the given RzBaseType name.
RZ_API bool rz_type_atomic_eq(const RzTypeDB *typedb, RZ_NONNULL const RzType *typ1, RZ_NONNULL const RzType *typ2)
Checks if two atomic RzTypes are equivalent.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
#define rz_warn_if_reached()
#define rz_return_val_if_fail(expr, val)
@ RZ_BASE_TYPE_KIND_ATOMIC
@ RZ_BASE_TYPE_KIND_UNION
@ RZ_BASE_TYPE_KIND_STRUCT
@ RZ_TYPE_IDENTIFIER_KIND_STRUCT
@ RZ_TYPE_IDENTIFIER_KIND_UNSPECIFIED
@ RZ_TYPE_IDENTIFIER_KIND_ENUM
@ RZ_TYPE_IDENTIFIER_KIND_UNION
@ RZ_TYPE_TYPECLASS_INTEGRAL_SIGNED
@ RZ_TYPE_TYPECLASS_INTEGRAL_UNSIGNED
RzTypeCond
Type Conditions.
@ RZ_TYPE_COND_LO
Carry clear Less than.
@ RZ_TYPE_COND_VS
Overflow Unordered.
@ RZ_TYPE_COND_HEX_SCL_TRUE
@ RZ_TYPE_COND_LE
Less or equal.
@ RZ_TYPE_COND_GE
Greater or equal.
@ RZ_TYPE_COND_HEX_VEC_TRUE
@ RZ_TYPE_COND_VC
No overflow Not unordered.
@ RZ_TYPE_COND_HEX_SCL_FALSE
@ RZ_TYPE_COND_LS
Unsigned lower or same Less than or equal.
@ RZ_TYPE_COND_NV
Never executed must be a nop? :D.
@ RZ_TYPE_COND_HS
Carry set >, ==, or unordered.
@ RZ_TYPE_COND_NE
Not equal.
@ RZ_TYPE_COND_AL
Always executed (no condition)
@ RZ_TYPE_COND_MI
Minus, negative Less than.
@ RZ_TYPE_COND_HI
Unsigned higher Greater than, or unordered.
@ RZ_TYPE_COND_GT
Greater than.
@ RZ_TYPE_COND_HEX_VEC_FALSE
@ RZ_TYPE_COND_PL
Plus, positive or zero >, ==, or unordered.
@ RZ_TYPE_COND_LT
Less than.
@ RZ_TYPE_KIND_IDENTIFIER
#define cond(bop, top, mask, flags)
struct rz_type_t::@292::@295 pointer
struct rz_type_t::@292::@294 identifier
struct rz_type_t::@292::@296 array
const char * default_type
RZ_API ut64 rz_type_db_base_get_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the base type size in bits (target dependent)
RZ_API RZ_BORROW const char * rz_type_identifier(RZ_NONNULL const RzType *type)
Returns the type C identifier.
RZ_API void rz_type_free(RZ_NULLABLE RzType *type)
Frees the RzType.
RZ_API bool rz_type_is_integral(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is Integral typeclass.
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.
RZ_API RzTypeTypeclass rz_base_type_typeclass(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type)
Gets the base type class.