389 const char *formatname,
int mode,
const char *setval,
char *ofield);
RZ_API void rz_type_base_type_free(RzBaseType *type)
Frees the RzBaseType instance and all of its members.
RZ_API void rz_type_base_enum_case_free(void *e, void *user)
RZ_API void rz_type_base_struct_member_free(void *e, void *user)
RZ_API RZ_OWN RzList * rz_type_db_get_base_types(const RzTypeDB *typedb)
Returns the list of all basic types.
RZ_API RZ_BORROW RzBaseType * rz_type_db_get_compound_type(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the compound RzBaseType in the types database given the name.
RZ_API RZ_OWN RzBaseType * rz_type_base_type_new(RzBaseTypeKind kind)
Allocates a new instance of RzBaseType given the kind.
RZ_API RZ_OWN char * rz_type_db_base_type_as_pretty_string(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, unsigned int opts, int unfold_level)
Returns C representation as string of RzBaseType.
RZ_API void rz_type_db_save_base_type(const RzTypeDB *typedb, const RzBaseType *type)
Saves RzBaseType into the Types DB.
RZ_API RZ_BORROW const char * rz_type_base_type_kind_as_string(RzBaseTypeKind kind)
Returns string representing the kind of base type.
RZ_API void rz_type_base_union_member_free(void *e, void *user)
RZ_API RZ_OWN char * rz_type_db_base_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype)
Returns C representation as string of RzBaseType (see rz_type_db_base_type_as_pretty_string for cusom...
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.
RZ_API bool rz_type_db_delete_base_type(RzTypeDB *typedb, RZ_NONNULL RzBaseType *type)
Removes RzBaseType from the Types DB.
RZ_API RZ_OWN RzList * rz_type_db_get_base_types_of_kind(const RzTypeDB *typedb, RzBaseTypeKind kind)
Returns the list of all basic types of the chosen kind.
int bits(struct state *s, int need)
RZ_API RZ_OWN RzTypeParser * rz_type_parser_init(HtPP *types, HtPP *callables)
Creates a new instance of the C type parser.
RZ_API int rz_type_parse_file(RzTypeDB *typedb, const char *path, const char *dir, char **error_msg)
Parses the C types file creating the new parser state.
RZ_API RZ_OWN RzType * rz_type_parse_string_declaration_single(RzTypeParser *parser, const char *code, char **error_msg)
Parses the single C type declaration.
RZ_API RZ_OWN RzTypeParser * rz_type_parser_new()
Creates a new instance of the C type parser.
RZ_API void rz_type_parser_free(RZ_NONNULL RzTypeParser *parser)
Frees the instance of the C type parser without destroying hashtables.
RZ_API RZ_OWN RzType * rz_type_parse_string_single(RzTypeParser *parser, const char *code, char **error_msg)
Parses the single C type definition.
RZ_API int rz_type_parse_string_stateless(RzTypeParser *parser, const char *code, char **error_msg)
Parses the C type string reusing the existing parser state.
RZ_API int rz_type_parse_file_stateless(RzTypeParser *parser, const char *path, const char *dir, char **error_msg)
Parses the C types file reusing the existing parser state.
RZ_API void rz_type_parse_reset(RzTypeDB *typedb)
Reset the C parser state.
RZ_API int rz_type_parse_string(RzTypeDB *typedb, const char *code, char **error_msg)
Parses the C type string creating the new parser state.
RZ_API void rz_type_parser_free_purge(RZ_NONNULL RzTypeParser *parser)
Frees the instance of the C type parser and destroy the hashtables.
static static fork const void static count static fd const char const char static newpath const char static path const char path
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 ***",...
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_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.
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.
insn_type_descr_t types[]
struct rz_type_union_member_t RzTypeUnionMember
@ RZ_BASE_TYPE_KIND_TYPEDEF
@ RZ_BASE_TYPE_KIND_ATOMIC
@ RZ_BASE_TYPE_KIND_UNION
@ RZ_BASE_TYPE_KIND_STRUCT
struct rz_type_path_t RzTypePath
struct rz_type_constraint_t RzTypeConstraint
type constrained by the type conditions
@ RZ_TYPE_ATTRIBUTE_TYPECLASS_MASK
@ RZ_TYPE_IDENTIFIER_KIND_STRUCT
@ RZ_TYPE_IDENTIFIER_KIND_UNSPECIFIED
@ RZ_TYPE_IDENTIFIER_KIND_ENUM
@ RZ_TYPE_IDENTIFIER_KIND_UNION
struct rz_type_struct_member_t RzTypeStructMember
@ RZ_TYPE_PRINT_NO_END_SEMICOLON
@ RZ_TYPE_PRINT_SHOW_TYPEDEF
@ RZ_TYPE_PRINT_UNFOLD_ANON_ONLY
@ RZ_TYPE_PRINT_UNFOLD_ANON_ONLY_STRICT
@ RZ_TYPE_PRINT_END_NEWLINE
@ RZ_TYPE_PRINT_MULTILINE
@ RZ_TYPE_PRINT_ANONYMOUS
struct rz_type_target_t RzTypeTarget
struct rz_callable_at RzCallable
struct rz_base_type_union_t RzBaseTypeUnion
struct rz_base_type_enum_t RzBaseTypeEnum
struct rz_base_type_t RzBaseType
struct rz_callable_arg_t RzCallableArg
@ RZ_TYPE_TYPECLASS_FLOATING
@ RZ_TYPE_TYPECLASS_INVALID
@ RZ_TYPE_TYPECLASS_ADDRESS
@ RZ_TYPE_TYPECLASS_INTEGRAL
@ 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.
struct rz_type_enum_case_t RzTypeEnumCase
struct rz_base_type_struct_t RzBaseTypeStruct
@ RZ_TYPE_KIND_IDENTIFIER
struct rz_type_db_t RzTypeDB
RZ_LIB_VERSION_HEADER(rz_type)
RZ_API bool rz_type_db_load_callables_sdb_str(RzTypeDB *typedb, RZ_NONNULL const char *str)
Loads the callable types from SDB KV string.
RZ_API bool rz_serialize_callables_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzTypeDB *typedb, RZ_NULLABLE RzSerializeResultInfo *res)
Loads the callable types from SDB.
RZ_API bool rz_type_db_load_callables_sdb(RzTypeDB *typedb, RZ_NONNULL const char *path)
Loads the callable types from compiled SDB specified by path.
RZ_API void rz_serialize_callables_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzTypeDB *typedb)
Saves the callable types into SDB.
RZ_API void rz_serialize_types_save(RZ_NONNULL Sdb *db, RZ_NONNULL const RzTypeDB *typedb)
Saves the types into SDB.
RZ_API bool rz_type_db_load_sdb_str(RzTypeDB *typedb, RZ_NONNULL const char *str)
Loads the types from SDB KV string.
RZ_API bool rz_serialize_types_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzTypeDB *typedb, RZ_NULLABLE RzSerializeResultInfo *res)
Loads the types from SDB.
RZ_API bool rz_type_db_load_sdb(RzTypeDB *typedb, RZ_NONNULL const char *path)
Loads the types from compiled SDB specified by path.
#define cond(bop, top, mask, flags)
RzBaseTypeStruct struct_data
RzBaseTypeUnion union_data
RzPVector * args
optional for the time being
RZ_NULLABLE const char * cc
type constrained by the type conditions
RzTypeIdentifierKind kind
struct rz_type_t::@292::@295 pointer
struct rz_type_t::@292::@294 identifier
struct rz_type_t::@292::@296 array
int addr_bits
size of a pointer if > 0, otherwise bits is used.
const char * default_type
RZ_API RZ_OWN RzCallable * rz_type_callable_clone(RZ_BORROW RZ_NONNULL const RzCallable *callable)
Creates an exact clone of the RzCallable type.
RZ_API RZ_BORROW RzCallable * rz_type_func_get(RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the RzCallable from the database by name.
RZ_API bool rz_type_func_cc_set(RzTypeDB *typedb, const char *name, const char *cc)
Searches for the RzCallable type in types database and set the calling convention.
RZ_API bool rz_type_callable_arg_add(RZ_NONNULL RzCallable *callable, RZ_OWN RZ_NONNULL RzCallableArg *arg)
Adds a new argument to the RzCallable.
RZ_API int rz_type_func_args_count(RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzCallable type in types database and returns arguments' count.
RZ_API bool rz_type_func_noreturn_drop(RzTypeDB *typedb, RZ_NONNULL const char *name)
Drops the "noreturn" attribute from the RzCallable type.
RZ_API RZ_BORROW const char * rz_type_func_args_name(RzTypeDB *typedb, RZ_NONNULL const char *name, int i)
Searches for the RzCallable type in types database and returns argument name.
RZ_API bool rz_type_func_is_noreturn(RzTypeDB *typedb, RZ_NONNULL const char *name)
Checks if the RzCallable type is defined as "noreturn".
RZ_API RZ_OWN RzCallable * rz_type_func_new(RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_OWN RZ_NULLABLE RzType *type)
Creates a new RzCallable type.
RZ_API RZ_BORROW RzType * rz_type_func_ret(RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzCallable type in types database and returns return type.
RZ_API bool rz_type_is_callable_ptr(RZ_NONNULL const RzType *type)
Checks if the RzType is the pointer to the RzCallable.
RZ_API void rz_type_func_delete_all(RzTypeDB *typedb)
Removes all RzCallable types.
RZ_API bool rz_type_func_exist(RzTypeDB *typedb, RZ_NONNULL const char *name)
Checks if the RzCallable type exists in the database given the name.
RZ_API bool rz_type_func_arg_add(RzTypeDB *typedb, RZ_NONNULL const char *func_name, RZ_NONNULL const char *arg_name, RZ_OWN RZ_NONNULL RzType *arg_type)
Adds a new argument to the RzCallable type at the end of the arguments vector.
RZ_API RZ_BORROW RzType * rz_type_func_args_type(RzTypeDB *typedb, RZ_NONNULL const char *name, int i)
Searches for the RzCallable type in types database and returns argument type.
RZ_API RZ_OWN RzCallableArg * rz_type_callable_arg_clone(RZ_BORROW RZ_NONNULL const RzCallableArg *arg)
Creates am exact clone of RzCallableArg.
RZ_API RZ_OWN char * rz_type_callable_ptr_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the callable pointer C representation.
RZ_API RZ_OWN RzCallableArg * rz_type_callable_arg_new(RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_OWN RZ_NONNULL RzType *type)
Creates a new RzCallableArg given the name and type.
RZ_API RZ_OWN RzList * rz_type_noreturn_function_names(RzTypeDB *typedb)
Returns the list of all noreturn function type names.
RZ_API RZ_OWN RzCallable * rz_type_callable_new(RZ_NULLABLE const char *name)
Creates a new RzCallable type.
RZ_API void rz_type_callable_free(RZ_NONNULL RzCallable *callable)
Frees the RzCallable.
RZ_API RZ_OWN RzList * rz_type_function_names(RzTypeDB *typedb)
Returns the list of all function type names.
RZ_API bool rz_type_func_delete(RzTypeDB *typedb, RZ_NONNULL const char *name)
Removes RzCallable type from the types database.
RZ_API bool rz_type_is_callable(RZ_NONNULL const RzType *type)
Checks if the RzType is the pointer to the RzCallable.
RZ_API RZ_OWN char * rz_type_callable_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzCallable *callable)
Returns the callable C representation.
RZ_API bool rz_type_func_save(RzTypeDB *typedb, RZ_NONNULL RzCallable *callable)
Stores RzCallable type in the types database.
RZ_API void rz_type_callable_arg_free(RzCallableArg *arg)
Frees the RzCallableArg.
RZ_API RZ_BORROW const char * rz_type_func_cc(RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzCallable type in types database and returns calling convention.
RZ_API bool rz_type_func_noreturn_add(RzTypeDB *typedb, RZ_NONNULL const char *name)
Adds the "noreturn" attribute to the RzCallable type.
RZ_API bool rz_type_func_ret_set(RzTypeDB *typedb, const char *name, RZ_OWN RZ_NONNULL RzType *type)
Sets the new return type for the RzCallable.
RZ_API bool rz_type_is_callable_ptr_nested(RZ_NONNULL const RzType *type)
Checks if the RzType is the nested pointer to the RzCallable.
RZ_API ut64 rz_type_db_struct_member_offset(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *member)
Returns the offset in bytes of the structure member if there is a match.
RZ_API st64 rz_type_offset_by_path(const RzTypeDB *typedb, RZ_NONNULL const char *path)
Returns the offset of the member given path.
RZ_API RZ_OWN RzTypePath * rz_type_path_new(RZ_BORROW RZ_NONNULL RzType *type, RZ_OWN RZ_NONNULL char *path)
Creates a new instance of RzTypePath.
RZ_API RZ_OWN RzList * rz_type_db_get_by_offset(const RzTypeDB *typedb, ut64 offset)
Returns the list of all structured types that have members matching the offset.
RZ_API ut64 rz_type_db_struct_member_packed_offset(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *member)
Returns the packed offset in bits of the structure member if there is a match.
RZ_API RZ_OWN RzList * rz_type_path_by_offset(const RzTypeDB *typedb, RzBaseType *btype, ut64 offset)
Returns the list of all type paths matching the offset.
RZ_API void rz_type_path_free(RZ_NULLABLE RzTypePath *tpath)
Frees the RzTypePath.
RZ_API void rz_type_db_set_address_bits(RzTypeDB *typedb, int addr_bits)
Set the RzType target adress size.
RZ_API ut64 rz_type_db_union_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the union type size in bits (target dependent)
RZ_API void rz_type_db_reload(RzTypeDB *typedb, const char *types_dir)
Re-initializes the types database for current target.
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 int rz_type_kind(RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the kind (RzBaseTypeKind) of the type.
RZ_API void rz_type_db_set_os(RzTypeDB *typedb, const char *os)
Set the RzType target architecture operating system.
RZ_API RZ_BORROW const char * rz_type_identifier(RZ_NONNULL const RzType *type)
Returns the type C identifier.
RZ_API void rz_type_db_set_bits(RzTypeDB *typedb, int bits)
Set the RzType target architecture bits.
RZ_API ut64 rz_type_db_get_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzType *type)
Returns the type size in bits (target dependent)
RZ_API bool rz_types_equal(RZ_NONNULL const RzType *type1, RZ_NONNULL const RzType *type2)
Checks if two types are identical.
RZ_API void rz_type_db_free(RzTypeDB *typedb)
Frees the instance of the RzTypeDB.
RZ_API RZ_OWN char * rz_type_declaration_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the type C declaration representation.
RZ_API void rz_type_db_purge(RzTypeDB *typedb)
Purges the instance of the RzTypeDB.
RZ_API RZ_BORROW const char * rz_type_db_enum_member_by_val(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val)
Returns the enum case name matching the cpecified value.
RZ_API bool rz_type_exists(RzTypeDB *typedb, RZ_NONNULL const char *name)
Checks if the type exists in the Type database.
RZ_API bool rz_type_db_edit_base_type(RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *typestr)
Edits the existing base type given the new C code.
RZ_API void rz_type_free(RZ_NULLABLE RzType *type)
Frees the RzType.
RZ_API ut64 rz_type_db_typedef_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the typedef type size in bits (target dependent)
RZ_API RZ_OWN RzType * rz_type_clone(RZ_BORROW RZ_NONNULL const RzType *type)
Creates an exact clone of the RzType.
RZ_API void rz_type_db_set_endian(RzTypeDB *typedb, bool big_endian)
Set the RzType target architecture CPU.
RZ_API RZ_OWN char * rz_type_as_pretty_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type, RZ_NULLABLE const char *identifier, unsigned int opts, int unfold_level)
Return a string contining the type pretty printed according to the options provided.
RZ_API RzBaseType * rz_type_db_get_enum(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the enum base type matching the specified name.
RZ_API RZ_BORROW RzBaseType * rz_type_get_base_type(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the RzBaseType for the chosen RzType.
RZ_API ut64 rz_type_db_enum_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the enum type size in bits (target dependent)
RZ_API ut8 rz_type_db_pointer_size(const RzTypeDB *typedb)
Returns the pointer size for the current RzTypeDB target set.
RZ_API ut64 rz_type_db_struct_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the struct type size in bits (target dependent)
RZ_API RZ_OWN RzList * rz_type_db_enum_names(RzTypeDB *typedb)
Returns the list of all enum names.
RZ_API RZ_OWN char * rz_type_db_enum_get_bitfield(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val)
Returns all matching bitfields as an OR mask given the resulting value.
RZ_API RzTypeDB * rz_type_db_new()
Creates a new instance of the RzTypeDB.
RZ_API void rz_type_db_init(RzTypeDB *typedb, const char *types_dir, const char *arch, int bits, const char *os)
Initializes the types database for specified arch, bits, OS.
RZ_API bool rz_type_db_del(RzTypeDB *typedb, RZ_NONNULL const char *name)
Removes the type from the database.
RZ_API RZ_OWN RzList * rz_type_db_union_names(RzTypeDB *typedb)
Returns the list of all union names.
RZ_API ut64 rz_type_db_atomic_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype)
Returns the atomic type size in bits (target dependent)
RZ_API RZ_OWN RzList * rz_type_db_struct_names(RzTypeDB *typedb)
Returns the list of all struct names.
RZ_API RZ_OWN RzList * rz_type_db_all(RzTypeDB *typedb)
Returns the list of all type names.
RZ_API int rz_type_db_enum_member_by_name(const RzTypeDB *typedb, RZ_NONNULL const char *name, const char *member)
Returns the enum case value matched by the enum case name.
RZ_API RZ_OWN char * rz_type_identifier_declaration_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type, RZ_NONNULL const char *identifier)
Returns the type C representation with identifier.
RZ_API RzBaseType * rz_type_db_get_typedef(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the typedef base type matching the specified name.
RZ_API RZ_OWN RzList * rz_type_db_typedef_names(RzTypeDB *typedb)
Returns the list of all typedef (type aliases) names.
RZ_API RzBaseType * rz_type_db_get_union(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the union base type matching the specified name.
RZ_API RZ_OWN char * rz_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the type C representation.
RZ_API RzBaseType * rz_type_db_get_struct(const RzTypeDB *typedb, RZ_NONNULL const char *name)
returns the struct base type matching the specified name
RZ_API RZ_OWN RzList * rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val)
Returns all enums and cases name matching the specified value.
RZ_API void rz_type_db_format_purge(RzTypeDB *typedb)
Purges formats in the instance of the RzTypeDB.
RZ_API void rz_type_db_set_cpu(RzTypeDB *typedb, const char *cpu)
Set the RzType target architecture CPU.
RZ_API bool rz_type_is_num(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is Num typeclass.
RZ_API bool rz_base_type_is_integral(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type)
Checks if the RzBaseType is Integral typeclass.
RZ_API bool rz_base_type_is_floating(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type)
Checks if the RzBaseType is Floating typeclass.
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.
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.
RZ_API bool rz_type_is_integral(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is Integral typeclass.
RZ_API bool rz_base_type_is_num(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type)
Checks if the RzBaseType is Num typeclass.
RZ_API RZ_BORROW const char * rz_type_typeclass_as_string(RzTypeTypeclass typeclass)
Returns the string representation of a typeclass.
RZ_API RzTypeTypeclass rz_type_typeclass(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Gets the type class.
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.
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.
RZ_API RzTypeTypeclass rz_type_typeclass_from_string(RZ_NONNULL const char *typeclass)
Returns the typeclass from the string name of it.
RZ_API bool rz_type_is_integral_signed(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is Integral and Signed 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 RZ_OWN RzList * rz_type_typeclass_get_all(const RzTypeDB *typedb, RzTypeTypeclass typeclass)
Returns the list of all base types given the typeclass.
RZ_API bool rz_type_is_floating(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Checks if the RzType is Floating typeclass.
RZ_API RzTypeTypeclass rz_base_type_typeclass(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *type)
Gets the base type class.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()