Module ida_typeinf
Describes the type information records in IDA.
The recommended way of using type info is to use the tinfo_t class. The type information is internally kept as an array of bytes terminated by 0.
Items in brackets [] are optional and sometimes are omitted. type_t… means a sequence of type_t bytes which defines a type.
@note: to work with the types of instructions or data in the database, use get_tinfo()/set_tinfo() and similar functions.
Global variables
var ADDTIL_ABORTED-
til was not loaded (incompatible til rejected by user)
var ADDTIL_COMP-
ok, but til is not compatible with the current compiler
var ADDTIL_DEFAULT-
default behavior
var ADDTIL_FAILED-
something bad, the warning is displayed
var ADDTIL_INCOMP-
load incompatible tils
var ADDTIL_OK-
ok, til is loaded
var ADDTIL_SILENT-
do not ask any questions
var ALOC_CUSTOM-
custom argloc (7 or higher)
var ALOC_DIST-
distributed (scattered)
var ALOC_NONE-
none
var ALOC_REG1-
one register (and offset within it)
var ALOC_REG2-
register pair
var ALOC_RREL-
register relative
var ALOC_STACK-
stack offset
var ALOC_STATIC-
global address
var ARGREGS_BY_SLOTS-
fixed FP/GP register per each slot (like vc64)
var ARGREGS_FP_MASKS_GP-
FP register also consumes one or more GP regs but not vice versa (aix ppc ABI)
var ARGREGS_GP_ONLY-
GP registers used for all arguments.
var ARGREGS_INDEPENDENT-
FP/GP registers used separately (like gcc64)
var ARGREGS_MIPS_O32-
MIPS ABI o32.
var ARGREGS_RISCV-
Risc-V API FP arguments are passed in GP registers if FP registers are exhausted and GP ones are not. Wide FP arguments are passed in GP registers. Variadic FP arguments are passed in GP registers.
var BADSIZE-
bad type size
var BFA_FUNC_EXT_FORMAT-
This is NOT a real attribute (used internally as marker for extended format)
var BFA_FUNC_MARKER-
This is NOT a cc! (used internally as a marker)
var BFA_HIGH-
high level prototype (with possibly hidden args)
var BFA_NORET-
__noreturn
var BFA_PURE-
__pure
var BFA_STATIC-
static
var BFA_VIRTUAL-
virtual
var BTE_ALWAYS-
this bit MUST be present
var BTE_BITMASK-
'subarrays'. In this case ANY record has the following format: * 'de' mask (has name) * 'dt' cnt * cnt records of 'de' values (cnt CAN be 0) @note: delta for ALL subsegment is ONE
var BTE_CHAR-
char or hex
var BTE_HEX-
hex
var BTE_OUT_MASK-
output style mask
var BTE_RESERVED-
must be 0, in order to distinguish from a tah-byte
var BTE_SDEC-
signed decimal
var BTE_SIZE_MASK-
storage size. * if == 0 then inf_get_cc_size_e() * else 1 << (n -1) = 1,2,4,8 * n == 5,6,7 are reserved
var BTE_UDEC-
unsigned decimal
var BTF_BOOL-
boolean
var BTF_BYTE-
byte
var BTF_CHAR-
signed char
var BTF_DOUBLE-
double
var BTF_ENUM-
enum
var BTF_FLOAT-
float
var BTF_INT-
int, unknown signedness
var BTF_INT128-
signed 128-bit value
var BTF_INT16-
signed short
var BTF_INT32-
signed int
var BTF_INT64-
signed long
var BTF_INT8-
signed byte
var BTF_LDOUBLE-
long double
var BTF_SINT-
singed int
var BTF_STRUCT-
struct
var BTF_TBYTE-
see BTMT_SPECFLT
var BTF_TYPEDEF-
typedef
var BTF_UCHAR-
unsigned char
var BTF_UINT-
unsigned int
var BTF_UINT128-
unsigned 128-bit value
var BTF_UINT16-
unsigned short
var BTF_UINT32-
unsigned int
var BTF_UINT64-
unsigned long
var BTF_UINT8-
unsigned byte
var BTF_UNION-
union
var BTF_UNK-
unknown
var BTF_VOID-
void
var BTMT_ARRESERV-
reserved bit
var BTMT_BFLDI16-
__int16
var BTMT_BFLDI32-
__int32
var BTMT_BFLDI64-
__int64
var BTMT_BFLDI8-
__int8
var BTMT_BOOL1-
size 1byte
var BTMT_BOOL2-
size 2bytes - !inf_is_64bit()
var BTMT_BOOL4-
size 4bytes
var BTMT_BOOL8-
size 8bytes - inf_is_64bit()
var BTMT_CHAR-
specify char or segment register * BT_INT8 - char * BT_INT - segment register * other BT_INT… - don't use
var BTMT_CLOSURE-
closure. * if ptr to BT_FUNC - __closure. in this case next byte MUST be RESERVED_BYTE, and after it BT_FUNC * else the next byte contains sizeof(ptr) allowed values are 1 - ph.max_ptr_size * if value is bigger than ph.max_ptr_size, based_ptr_name_and_size() is called to find out the typeinfo
var BTMT_DEFBOOL-
size is model specific or unknown(?)
var BTMT_DEFCALL-
call method - default for model or unknown
var BTMT_DEFPTR-
default for model
var BTMT_DOUBLE-
double (8 bytes)
var BTMT_ENUM-
enum: next byte bte_t (see below) N records: de delta(s) OR blocks (see below)
var BTMT_FAR-
far
var BTMT_FARCALL-
function returns by retf
var BTMT_FLOAT-
float (4 bytes)
var BTMT_INTCALL-
function returns by iret in this case cc MUST be 'unknown'
var BTMT_LNGDBL-
long double (compiler specific)
var BTMT_NEAR-
near
var BTMT_NEARCALL-
function returns by retn
var BTMT_NONBASED-
if set array base==0 format: dt num_elem; [tah-typeattrs]; type_t… if num_elem==0 then the array size is unknown else format: da num_elem, base; [tah-typeattrs]; type_t… used only for serialization
var BTMT_SIGNED-
signed
var BTMT_SIZE0-
BT_VOID - normal void; BT_UNK - don't use
var BTMT_SIZE12-
size = 1 byte if BT_VOID; 2 if BT_UNK
var BTMT_SIZE128-
size = 16 bytes if BT_VOID; unknown if BT_UNK (IN struct alignment - see below)
var BTMT_SIZE48-
size = 4 bytes if BT_VOID; 8 if BT_UNK
var BTMT_SPECFLT-
float (variable size). if processor_t::use_tbyte() then use processor_t::tbyte_size, otherwise 2 bytes
var BTMT_STRUCT-
struct: MCNT records: type_t; [sdacl-typeattrs];
var BTMT_TYPEDEF-
named reference always p_string name
var BTMT_UNION-
union: MCNT records: type_t…
var BTMT_UNKSIGN-
unknown signedness
var BTMT_USIGNED-
unsigned
var BTM_CONST-
const
var BTM_VOLATILE-
volatile
var BT_ARRAY-
array
var BT_BITFIELD-
bitfield (only in struct) ['bitmasked' enum see below] next byte is dt ((size in bits << 1) | (unsigned ? 1 : 0))
var BT_BOOL-
bool
var BT_COMPLEX-
struct/union/enum/typedef. format: [dt N (N=field count) if !BTMT_TYPEDEF] if N == 0: p_string name (unnamed types have names "anon_…") [sdacl-typeattrs]; else, for struct & union: if N == 0x7FFE // Support for high (i.e., > 4095) members count N = deserialize_de() ALPOW = N & 0x7 MCNT = N >> 3 if MCNT == 0 empty struct if ALPOW == 0 ALIGN = get_default_align() else ALIGN = (1 << (ALPOW - 1)) [sdacl-typeattrs]; else, for enums: if N == 0x7FFE // Support for high enum entries count. N = deserialize_de() [tah-typeattrs];
var BT_FLOAT-
float
var BT_FUNC-
function. format: optional: CM_CC_SPOILED | num_of_spoiled_regs if num_of_spoiled_reg == BFA_FUNC_MARKER: ::bfa_byte if (bfa_byte & BFA_FUNC_EXT_FORMAT) != 0 ::fti_bits (only low bits: FTI_SPOILED,…,FTI_VIRTUAL) num_of_spoiled_reg times: spoiled reg info (see extract_spoiledreg) else bfa_byte is function attribute byte (see Function attribute byte…) else: num_of_spoiled_reg times: spoiled reg info (see extract_spoiledreg) cm_t … calling convention and memory model [tah-typeattrs]; type_t … return type; [serialized argloc_t of returned value (if CM_CC_SPECIAL{PE} && !return void); if !CM_CC_VOIDARG: dt N (N=number of parameters) if ( N == 0 ) if CM_CC_ELLIPSIS or CM_CC_SPECIALE func(…) else parameters are unknown else N records: type_t … (i.e. type of each parameter) [serialized argloc_t (if CM_CC_SPECIAL{PE})] (i.e. place of each parameter) [FAH_BYTE + de( funcarg_t::flags )]
var BT_INT-
natural int. (size provided by idp module)
var BT_INT128-
__int128 (for alpha & future use)
var BT_INT16-
__int16
var BT_INT32-
__int32
var BT_INT64-
__int64
var BT_INT8-
__int8
var BT_PTR-
pointer. has the following format: [db sizeof(ptr)]; [tah-typeattrs]; type_t…
var BT_RESERVED-
RESERVED.
var BT_SEGREG-
segment register
var BT_UNK-
unknown
var BT_UNKNOWN-
unknown size - for parameters
var BT_UNK_BYTE-
1 byte
var BT_UNK_DWORD-
4 bytes
var BT_UNK_OWORD-
16 bytes
var BT_UNK_QWORD-
8 bytes
var BT_UNK_WORD-
2 bytes
var BT_VOID-
void
var CC_ALLOW_ARGPERM-
disregard argument order?
var CC_ALLOW_REGHOLES-
allow holes in register argument list?
var CC_CDECL_OK-
can use __cdecl calling convention?
var CC_GOLANG_OK-
can use __golang calling convention
var CC_HAS_ELLIPSIS-
function has a variable list of arguments?
var CM_CC_CDECL-
stack
var CM_CC_ELLIPSIS-
cdecl + ellipsis
var CM_CC_FASTCALL-
stack, purged (x86), first args are in regs (compiler-dependent)
var CM_CC_GOLANG-
(Go) arguments and return value in stack
var CM_CC_INVALID-
this value is invalid
var CM_CC_PASCAL-
stack, purged, reverse order of args
var CM_CC_SPECIAL-
usercall: locations of all arguments and the return value are explicitly specified
var CM_CC_SPECIALE-
CM_CC_SPECIAL with ellipsis
var CM_CC_SPECIALP-
Equal to CM_CC_SPECIAL, but with purged stack.
var CM_CC_SPOILED-
This is NOT a cc! Mark of __spoil record the low nibble is count and after n {spoilreg_t} present real cm_t byte. if n == BFA_FUNC_MARKER, the next byte is the function attribute byte.
var CM_CC_STDCALL-
stack, purged
var CM_CC_SWIFT-
(Swift) arguments and return values in registers (compiler-dependent)
var CM_CC_THISCALL-
stack, purged (x86), first arg is in reg (compiler-dependent)
var CM_CC_UNKNOWN-
unknown calling convention
var CM_CC_VOIDARG-
function without arguments if has other cc and argnum == 0, represent as f() - unknown list
var CM_M_FF-
large: code=far, data=far
var CM_M_FN-
medium: code=far, data=near
var CM_M_NF-
compact: code=near, data=far
var CM_M_NN-
small: code=near, data=near (or unknown if CM_UNKNOWN)
var CM_N16_F32-
near 2 bytes, far 4 bytes
var CM_N32_F48-
near 4 bytes, far 6 bytes
var CM_N64-
if sizeof(int)>2: near 8 bytes, far 8 bytes
var CM_N8_F16-
if sizeof(int)<=2: near 1 byte, far 2 bytes
var CM_UNKNOWN-
unknown
var COMP_BC-
Borland C++.
var COMP_BP-
Delphi.
var COMP_GNU-
GNU C++.
var COMP_MS-
Visual C++.
var COMP_UNK-
Unknown.
var COMP_UNSURE-
uncertain compiler id
var COMP_VISAGE-
Visual Age C++.
var COMP_WATCOM-
Watcom C++.
var DEFMASK64-
default bitmask 64bits
var ETF_AUTONAME-
udm - generate a member name if was not specified (add_udm, set_udm_type)
var ETF_BYTIL-
udm - new type was created by the type subsystem
var ETF_COMPATIBLE-
new type must be compatible with the old
var ETF_FORCENAME-
anyway use name, see below for more usage description
var ETF_FUNCARG-
udm - member is a function argument (cannot create arrays)
var ETF_MAY_DESTROY-
may destroy other members
var ETF_NO_ARRAY-
add_udm, set_udm_type - do not convert type to an array on the size mismatch
var ETF_NO_LAYOUT-
don't calc type layout before editing
var ETF_NO_SAVE-
don't save to til (normally typerefs are saved to til) A call with ETF_NO_SAVE must be followed by a call without it. Otherwise there may be inconsistencies between the memory and the type library.
var FAH_BYTE-
function argument attribute header byte
var FAI_ARRAY-
was initially an array; see "__org_typedef" or "__org_arrdim" type attributes to determine the original type
var FAI_HIDDEN-
hidden argument
var FAI_RETPTR-
pointer to return value. implies hidden
var FAI_STRUCT-
was initially a structure
var FAI_UNUSED-
argument is not used by the function
var FIRST_NONTRIVIAL_TYPID-
Denotes the first bit describing a nontrivial type.
var FRB_CHAR-
Char.
var FRB_CUSTOM-
*Custom data type
var FRB_ENUM-
*Enumeration
var FRB_FLOAT-
Floating point number (for interpreting an integer type as a floating value)
var FRB_INVBITS-
Invert bits (0x01 is represented as ~0xFE)
var FRB_INVSIGN-
Invert sign (0x01 is represented as -0xFF)
var FRB_LZERO-
Toggle leading zeroes (used for integers)
var FRB_MASK-
Mask for the value type (* means requires additional info):
var FRB_NUMB-
Binary number.
var FRB_NUMD-
Decimal number.
var FRB_NUMH-
Hexadecimal number.
var FRB_NUMO-
Octal number.
var FRB_OFFSET-
*Offset
var FRB_SEG-
Segment.
var FRB_SIGNED-
Force signed representation.
var FRB_STRLIT-
*String literal (used for arrays)
var FRB_STROFF-
*Struct offset
var FRB_TABFORM-
has additional tabular parameters
var FRB_UNK-
Unknown.
var FTI_ALL-
all defined bits
var FTI_ARGLOCS-
info about argument locations has been calculated (stkargs and retloc too)
var FTI_CALLTYPE-
mask for FTI_*CALL
var FTI_CONST-
const member function
var FTI_CTOR-
constructor
var FTI_DEFCALL-
default call
var FTI_DTOR-
destructor
var FTI_EXPLOCS-
all arglocs are specified explicitly
var FTI_FARCALL-
far call
var FTI_HIGH-
high level prototype (with possibly hidden args)
var FTI_INTCALL-
interrupt call
var FTI_NEARCALL-
near call
var FTI_NORET-
noreturn
var FTI_PURE-
__pure
var FTI_SPOILED-
information about spoiled registers is present
var FTI_STATIC-
static
var FTI_VIRTUAL-
virtual
var GTD_CALC_ARGLOCS-
calculate func arg locations
var GTD_CALC_LAYOUT-
calculate udt layout
var GTD_DEL_BITFLDS-
delete udt bitfields
var GTD_NO_ARGLOCS-
don't calculate func arg locations please note that the locations may have been calculated earlier
var GTD_NO_LAYOUT-
don't calculate udt layout please note that udt layout may have been calculated earlier
var GTS_BASECLASS-
is baseclass of a udt
var GTS_NESTED-
nested type (embedded into a udt)
var GUESS_FUNC_FAILED-
couldn't guess the function type
var GUESS_FUNC_OK-
ok, some non-trivial information is gathered
var GUESS_FUNC_TRIVIAL-
the function type doesn't have interesting info
var HTI_CPP-
C++ mode (not implemented)
var HTI_DCL-
don't complain about redeclarations
var HTI_EXT-
debug: print external representation of types
var HTI_FIL-
"input" is file name, otherwise "input" contains a C declaration
var HTI_HIGH-
assume high level prototypes (with hidden args, etc)
var HTI_INT-
debug: print internal representation of types
var HTI_LEX-
debug: print tokens
var HTI_LOWER-
lower the function prototypes
var HTI_MAC-
define macros from the base tils
var HTI_NDC-
don't decorate names
var HTI_NER-
ignore all errors but display them
var HTI_NOBASE-
do not inspect base tils
var HTI_NWR-
no warning messages
var HTI_PAK-
explicit structure pack value (#pragma pack)
var HTI_PAK1-
pragma pack(1)
var HTI_PAK16-
pragma pack(16)
var HTI_PAK2-
pragma pack(2)
var HTI_PAK4-
pragma pack(4)
var HTI_PAK8-
pragma pack(8)
var HTI_PAKDEF-
default pack value
var HTI_PAK_SHIFT-
shift for HTI_PAK. This field should be used if you want to remember an explicit pack value for each structure/union type. See HTI_PAK… definitions
var HTI_RAWARGS-
leave argument names unchanged (do not remove underscores)
var HTI_RELAXED-
accept references to unknown namespaces
var HTI_TST-
test mode: discard the result
var HTI_UNP-
debug: check the result by unpacking it
var MAX_ENUM_SERIAL-
Max number of identical constants allowed for one enum type.
var MAX_FUNC_ARGS-
max number of function arguments
var NTF_64BIT-
value is 64bit
var NTF_CHKSYNC-
check that synchronization to IDB passed OK (set_numbered_type, set_named_type)
var NTF_COPY-
save a new type definition, not a typeref (tinfo_t::set_numbered_type, tinfo_t::set_named_type)
var NTF_FIXNAME-
force-validate the name of the type when setting (set_named_type, set_numbered_type only)
var NTF_IDBENC-
the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly (set_named_type, set_numbered_type only)
var NTF_NOBASE-
don't inspect base tils (for get_named_type)
var NTF_NOCUR-
don't inspect current til file (for get_named_type)
var NTF_NO_NAMECHK-
do not validate type name (set_numbered_type, set_named_type)
var NTF_REPLACE-
replace original type (for set_named_type)
var NTF_SYMM-
symbol, name is mangled ('_func'); only one of NTF_TYPE and NTF_SYMU, NTF_SYMM can be used
var NTF_SYMU-
symbol, name is unmangled ('func')
var NTF_TYPE-
type name
var NTF_UMANGLED-
name is unmangled (don't use this flag)
var PDF_DEF_BASE-
Include base types: __int8, __int16, etc..
var PDF_DEF_FWD-
Allow forward declarations.
var PDF_HEADER_CMT-
Prepend output with a descriptive comment.
var PDF_INCL_DEPS-
Include all type dependencies.
var PIO_IGNORE_PTRS-
do not follow pointers
var PIO_NOATTR_FAIL-
missing attributes are not ok
var PRALOC_STKOFF-
print stack offsets
var PRALOC_VERIFY-
interr if illegal argloc
var PRTYPE_1LINCMT-
print comments even in the one line mode
var PRTYPE_1LINE-
print to one line
var PRTYPE_ARGLOCS-
print function arglocs (not only for usercall)
var PRTYPE_COLORED-
add color tag COLOR_SYMBOL for any parentheses, commas and colons
var PRTYPE_CPP-
use c++ name (only for print_type())
var PRTYPE_DEF-
tinfo_t: print definition, if available
var PRTYPE_HEADER-
print only type header (only for definitions)
var PRTYPE_MAXSTR-
limit the output length to 1024 bytes (the output may be slightly longer)
var PRTYPE_METHODS-
tinfo_t: print udt methods
var PRTYPE_MULTI-
print to many lines
var PRTYPE_NOARGS-
tinfo_t: do not print function argument names
var PRTYPE_NOARRS-
tinfo_t: print arguments with FAI_ARRAY as pointers
var PRTYPE_NOREGEX-
do not apply regular expressions to beautify name
var PRTYPE_NORES-
tinfo_t: never resolve types (meaningful with PRTYPE_DEF)
var PRTYPE_OFFSETS-
print udt member offsets
var PRTYPE_PRAGMA-
print pragmas for alignment
var PRTYPE_RESTORE-
tinfo_t: print restored types for FAI_ARRAY and FAI_STRUCT
var PRTYPE_SEMI-
append ; to the end
var PRTYPE_TAIL-
print only the definition tail (only for definitions, exclusive with PRTYPE_HEADER)
var PRTYPE_TYPE-
print type declaration (not variable declaration)
var PT_EMPTY-
accept empty decl
var PT_HIGH-
assume high level prototypes (with hidden args, etc)
var PT_LOWER-
lower the function prototypes
var PT_NDC-
don't decorate names
var PT_PACKMASK-
mask for pack alignment values
var PT_RAWARGS-
leave argument names unchanged (do not remove underscores)
var PT_RELAXED-
accept references to unknown namespaces
var PT_REPLACE-
replace the old type (used in idc)
var PT_SIL-
silent, no messages
var PT_TYP-
return declared type information
var PT_VAR-
return declared object information
var RESERVED_BYTE-
multifunctional purpose
var SC_AUTO-
auto
var SC_EXT-
extern
var SC_FRIEND-
friend
var SC_REG-
register
var SC_STAT-
static
var SC_TYPE-
typedef
var SC_UNK-
unknown
var SC_VIRT-
virtual
var SETCOMP_BY_USER-
invoked by user, cannot be replaced by module/loader
var SETCOMP_ONLY_ABI-
ignore cc field complete, use only abiname
var SETCOMP_ONLY_ID-
cc has only 'id' field; the rest will be set to defaults corresponding to the program bitness
var SETCOMP_OVERRIDE-
may override old compiler info
var STI_ACCHAR-
const char[]
var STI_ACHAR-
char[]
var STI_ACUCHAR-
const uint8[]
var STI_AEABI_LCMP-
int __fastcall __pure(int64 x, int64 y)
var STI_AEABI_MEMCLR-
void __fastcall(void *, size_t)
var STI_AEABI_MEMCPY-
void __fastcall(void , const void , size_t)
var STI_AEABI_MEMSET-
void __fastcall(void *, size_t, int)
var STI_AEABI_ULCMP-
int __fastcall __pure(uint64 x, uint64 y)
var STI_AUCHAR-
uint8[]
var STI_COMPLEX128-
struct complex128_t { double real, imag; }
var STI_COMPLEX64-
struct complex64_t { float real, imag; }
var STI_DONT_USE-
unused stock type id; should not be used
var STI_FDELOP-
void __cdecl(void *)
var STI_FPURGING-
void __userpurge(int)
var STI_MSGSEND-
void (void , const char *, …)
var STI_PBYTE-
_BYTE *
var STI_PCCHAR-
const char *
var STI_PCHAR-
char *
var STI_PCUCHAR-
const uint8 *
var STI_PCVOID-
const void *
var STI_PINT-
int *
var STI_PPVOID-
void **
var STI_PUCHAR-
uint8 *
var STI_PUINT-
unsigned int *
var STI_PUNKNOWN-
_UNKNOWN *
var STI_PVOID-
void *
var STI_RTC_CHECK_2-
int16 __fastcall(int16 x)
var STI_RTC_CHECK_4-
int32 __fastcall(int32 x)
var STI_RTC_CHECK_8-
int64 __fastcall(int64 x)
var STI_SIZE_T-
size_t
var STI_SSIZE_T-
ssize_t
var STRMEM_ANON-
can be combined with STRMEM_NAME: look inside anonymous members too.
var STRMEM_AUTO-
get member by offset if struct, or get member by index if union * nb: union: index is stored in the udm->offset field! * nb: struct: offset is in bytes (not in bits)!
var STRMEM_CASTABLE_TO-
can be combined with STRMEM_TYPE: member type must be castable to the specified type
var STRMEM_INDEX-
get member by number * in: udm->offset - is a member number
var STRMEM_LOWBND-
get member by offset or the next member (lower bound) * in: udm->offset - is a member offset in bits
var STRMEM_MAXS-
get biggest member by size.
var STRMEM_MINS-
get smallest member by size.
var STRMEM_NAME-
get member by name * in: udm->name - the desired member name.
var STRMEM_NEXT-
get next member after the offset * in: udm->offset - is a member offset in bits
var STRMEM_OFFSET-
get member by offset * in: udm->offset - is a member offset in bits
var STRMEM_SIZE-
get member by size. * in: udm->size - the desired member size.
var STRMEM_SKIP_EMPTY-
can be combined with STRMEM_OFFSET, STRMEM_AUTO skip empty members (i.e. having zero size) only last empty member can be returned
var STRMEM_SKIP_GAPS-
can be combined with STRMEM_OFFSET, STRMEM_LOWBND skip gap members
var STRMEM_TYPE-
get member by type. * in: udm->type - the desired member type. member types are compared with tinfo_t::equals_to()
var STRMEM_VFTABLE-
can be combined with STRMEM_OFFSET, STRMEM_AUTO get vftable instead of the base class
var STRUC_SEPARATOR-
structname.fieldname
var SUDT_ALIGN-
recalculate field alignments, struct packing, etc to match the offsets and size info
var SUDT_CONST-
only for serialize_udt: make type const
var SUDT_FAST-
serialize without verifying offsets and alignments
var SUDT_GAPS-
allow to fill gaps with additional members (_BYTE[])
var SUDT_SERDEF-
serialize: if a typeref, serialize its definition
var SUDT_SORT-
fields are not sorted by offset, sort them first
var SUDT_TRUNC-
serialize: truncate useless strings from fields, fldcmts
var SUDT_UNEX-
references to nonexistent member types are acceptable; in this case it is better to set the corresponding udm_t::fda field to the type alignment. If this field is not set, ida will try to guess the alignment.
var SUDT_VOLATILE-
only for serialize_udt: make type volatile
var TAENUM_64BIT-
enum: store 64-bit values
var TAENUM_BIN-
enum: binary representation, if BTE_HEX only one of OCT/BIN bits can be set. they are meaningful only if BTE_HEX is used.
var TAENUM_LZERO-
enum: print numbers with leading zeroes (only for HEX/OCT/BIN)
var TAENUM_NUMSIGN-
enum: signed representation, if BTE_HEX
var TAENUM_OCT-
enum: octal representation, if BTE_HEX
var TAENUM_SIGNED-
enum: signed
var TAENUM_UNSIGNED-
enum: unsigned
var TAFLD_BASECLASS-
field: do not include but inherit from the current field
var TAFLD_BYTIL-
field: was the member created due to the type system
var TAFLD_FRAME_R-
frame: function return address frame slot
var TAFLD_FRAME_S-
frame: function saved registers frame slot
var TAFLD_GAP-
field: gap member (displayed as padding in type details)
var TAFLD_METHOD-
denotes a udt member function
var TAFLD_REGCMT-
field: the comment is regular (if not set, it is repeatable)
var TAFLD_UNALIGNED-
field: unaligned field
var TAFLD_VFTABLE-
field: ptr to virtual function table
var TAFLD_VIRTBASE-
field: virtual base (not supported yet)
var TAH_ALL-
all defined bits
var TAH_BYTE-
type attribute header byte
var TAH_HASATTRS-
has extended attributes
var TAPTR_PTR32-
ptr: __ptr32
var TAPTR_PTR64-
ptr: __ptr64
var TAPTR_RESTRICT-
ptr: __restrict
var TAPTR_SHIFTED-
ptr: __shifted(parent_struct, delta)
var TAUDT_CPPOBJ-
struct: a c++ object, not simple pod type
var TAUDT_FIXED-
struct: fixed field offsets, stored in serialized form; cannot be set for unions
var TAUDT_MSSTRUCT-
struct: gcc msstruct attribute
var TAUDT_UNALIGNED-
struct: unaligned struct
var TAUDT_VFTABLE-
struct: is virtual function table
var TA_FORMAT-
info about the 'format' argument. 3 times pack_dd: format_functype_t, argument number of 'format', argument number of '…'
var TA_ORG_ARRDIM-
the original array dimension (pack_dd)
var TA_ORG_TYPEDEF-
the original typedef name (simple string)
var TA_VALUE_REPR-
serialized value_repr_t (used for scalars and arrays)
var TCMP_ANYBASE-
accept any base class when casting
var TCMP_AUTOCAST-
can t1 be cast into t2 automatically?
var TCMP_CALL-
can t1 be called with t2 type?
var TCMP_DECL-
compare declarations without resolving them
var TCMP_DELPTR-
remove pointer from types before comparing
var TCMP_EQUAL-
are types equal?
var TCMP_IGNMODS-
ignore const/volatile modifiers
var TCMP_MANCAST-
can t1 be cast into t2 manually?
var TCMP_SKIPTHIS-
skip the first function argument in comparison
var TERR_ALIEN_NAME-
enum member name is used in another enum
var TERR_BAD_ARG-
bad argument
var TERR_BAD_ARRAY-
arrays are forbidden as function arguments
var TERR_BAD_BASE-
bad base class
var TERR_BAD_BF-
bitfields are forbidden as function arguments
var TERR_BAD_BMASK-
Bad enum member mask 0xI64X. The specified mask should not intersect with any existing mask in the enum. Zero masks are prohibited too.
var TERR_BAD_FX_SIZE-
cannot extend struct beyond fixed size
var TERR_BAD_GAP-
bad gap
var TERR_BAD_GROUPS-
bad group sizes for bitmask enum
var TERR_BAD_INDEX-
bad index d
var TERR_BAD_LAYOUT-
failed to calculate the structure/union layout
var TERR_BAD_MSKVAL-
bad bmask and value combination (value=0xI64X; bitmask 0xI64X)
var TERR_BAD_NAME-
name s is not acceptable
var TERR_BAD_OFFSET-
bad member offset s
var TERR_BAD_REPR-
bad or incompatible field representation
var TERR_BAD_SERIAL-
enum value has too many serials
var TERR_BAD_SIZE-
bad size d
var TERR_BAD_SUBTYPE-
recursive structure nesting is forbidden
var TERR_BAD_TAH-
bad bits in the type attributes (TAH bits)
var TERR_BAD_TYPE-
bad type
var TERR_BAD_UNIVAR-
unions cannot have variable sized members
var TERR_BAD_VALUE-
value 0xI64X is not acceptable
var TERR_BAD_VARLAST-
variable sized member must be the last member in the structure
var TERR_DUPNAME-
duplicate name s
var TERR_ENUM_SIZE-
bad enum size
var TERR_GRP_NOEMPTY-
could not delete group mask for not empty group 0xI64X
var TERR_NESTED-
recursive structure nesting is forbidden
var TERR_NOT_COMPAT-
the new type is not compatible with the old type
var TERR_NOT_IMPL-
not implemented
var TERR_NO_BMASK-
bitmask 0xI64X is not found
var TERR_OK-
ok
var TERR_OVERLAP-
the member overlaps with other members that cannot be deleted
var TERR_SAVE_ERROR-
failed to save
var TERR_SERIALIZE-
failed to serialize
var TERR_STOCK-
stock type info cannot be modified
var TERR_STRUCT_SIZE-
bad fixed structure size
var TERR_TYPE_WORSE-
the new type is worse than the old type
var TERR_UNION_BF-
unions cannot have bitfields
var TIL_ADD_ALREADY-
the base til was already added
var TIL_ADD_FAILED-
see errbuf
var TIL_ADD_OK-
some tils were added
var TIL_ALI-
type aliases are present (this bit is used only on the disk)
var TIL_ESI-
extended sizeof info (short, long, longlong)
var TIL_MAC-
til has macro table
var TIL_MOD-
til has been modified, should be saved
var TIL_ORD-
type ordinal numbers are present
var TIL_SLD-
sizeof(long double)
var TIL_STM-
til has extra streams
var TIL_UNI-
universal til for any compiler
var TIL_ZIP-
pack buckets using zip
var TINFO_DEFINITE-
this is a definite type
var TINFO_DELAYFUNC-
if type is a function and no function exists at ea, schedule its creation and argument renaming to auto-analysis, otherwise try to create it immediately
var TINFO_GUESSED-
this is a guessed type
var TINFO_STRICT-
never convert given type to another one before applying
var TVIS_CMT-
new comment is present (only for udt members)
var TVIS_NAME-
new name is present (only for funcargs and udt members)
var TVIS_RPTCMT-
the new comment is repeatable
var TVIS_TYPE-
new type info is present
var TVST_DEF-
visit type definition (meaningful for typerefs)
var TVST_PRUNE-
don't visit children of current type
var TYPE_BASE_MASK-
the low 4 bits define the basic type
var TYPE_FLAGS_MASK-
type flags - they have different meaning depending on the basic type
var TYPE_FULL_MASK-
basic type with type flags
var TYPE_MODIF_MASK-
modifiers. * for BT_ARRAY see Derived type: array * BT_VOID can have them ONLY in 'void *'
var TYPID_ISREF-
Identifies that a type that is a typeref.
var TYPID_SHIFT-
First type detail bit.
var VALSTR_OPEN-
printed opening curly brace '{'
var no_sign-
no sign, or unknown
var type_signed-
signed type
var type_unsigned-
unsigned type
Functions
def add_til(name: char const *, flags: int)-
add_til(name, flags) -> int Load a til file and add it the database type libraries list. IDA will also apply function prototypes for matching function names.
@param name: (C++: const char *) til name @param flags: (C++: int) combination of Load TIL flags @return: one of Load TIL result codes
def alloc_type_ordinal(ti: til_t)-
alloc_type_ordinal(ti) -> uint32 alloc_type_ordinals(ti, 1)
@param ti: (C++: til_t *)
def alloc_type_ordinals(ti: til_t, qty: int)-
alloc_type_ordinals(ti, qty) -> uint32 Allocate a range of ordinal numbers for new types.
@param ti: (C++: til_t *) type library @param qty: (C++: int) number of ordinals to allocate @return: the first ordinal. 0 means failure.
def append_abi_opts(abi_opts: char const *, user_level: bool = False)-
append_abi_opts(abi_opts, user_level=False) -> bool Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-… or -opt1-opt2-…
@param abi_opts: (C++: const char *) - ABI options to add/remove in form opt1-opt2-… @param user_level: (C++: bool) - initiated by user if TRUE (==SETCOMP_BY_USER) @return: success
def append_argloc(out: qtype *, vloc: argloc_t)-
append_argloc(out, vloc) -> bool Serialize argument location
@param out: (C++: qtype *) @param vloc: (C++: const argloc_t &) argloc_t const &
def append_tinfo_covered(out: rangeset_t, typid: typid_t, offset: uint64)-
append_tinfo_covered(out, typid, offset) -> bool
@param out: rangeset_t * @param typid: typid_t @param offset: uint64
def apply_callee_tinfo(caller: ea_t, tif: tinfo_t)-
apply_callee_tinfo(caller, tif) -> bool Apply the type of the called function to the calling instruction. This function will append parameter comments and rename the local variables of the calling function. It also stores information about the instructions that initialize call arguments in the database. Use get_arg_addrs() to retrieve it if necessary. Alternatively it is possible to hook to processor_t::arg_addrs_ready event.
@param caller: (C++: ea_t) linear address of the calling instruction. must belong to a function. @param tif: (C++: const tinfo_t &) type info @return: success
def apply_cdecl(til: til_t, ea: ea_t, decl: char const *, flags: int = 0)-
apply_cdecl(til, ea, decl, flags=0) -> bool Apply the specified type to the address. This function parses the declaration and calls apply_tinfo()
@param til: (C++: til_t ) type library @param ea: (C++: ea_t) linear address @param decl: (C++: const char ) type declaration in C form @param flags: (C++: int) flags to pass to apply_tinfo (TINFO_DEFINITE is always passed) @return: success
def apply_named_type(ea: ea_t, name: char const *)-
apply_named_type(ea, name) -> bool Apply the specified named type to the address.
@param ea: (C++: ea_t) linear address @param name: (C++: const char *) the type name, e.g. "FILE" @return: success
def apply_once_tinfo_and_name(dea: ea_t, tif: tinfo_t, name: char const *)-
apply_once_tinfo_and_name(dea, tif, name) -> bool Apply the specified type and name to the address. This function checks if the address already has a type. If the old type does not exist or the new type is 'better' than the old type, then the new type will be applied. A type is considered better if it has more information (e.g. BTMT_STRUCT is better than BT_INT). The same logic is with the name: if the address already have a meaningful name, it will be preserved. Only if the old name does not exist or it is a dummy name like byte_123, it will be replaced by the new name.
@param dea: (C++: ea_t) linear address @param tif: (C++: const tinfo_t &) type string in the internal format @param name: (C++: const char *) new name for the address @return: success
def apply_tinfo(ea: ea_t, tif: tinfo_t, flags: uint32)-
apply_tinfo(ea, tif, flags) -> bool Apply the specified type to the specified address. This function sets the type and tries to convert the item at the specified address to conform the type.
@param ea: (C++: ea_t) linear address @param tif: (C++: const tinfo_t &) type string in internal format @param flags: (C++: uint32) combination of Apply tinfo flags @return: success
def apply_tinfo_to_stkarg(insn: insn_t const &, x: op_t const &, v: uval_t, tif: tinfo_t, name: char const *)-
apply_tinfo_to_stkarg(insn, x, v, tif, name) -> bool Helper function for the processor modules. to be called from processor_t::use_stkarg_type
@param insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &) @param x: (C++: const op_t &) op_t const & @param v: (C++: uval_t) @param tif: (C++: const tinfo_t &) tinfo_t const & @param name: (C++: const char *) char const *
def apply_type(ti: til_t, type: type_t const *, fields: p_list const *, ea: ea_t, flags: int)-
apply_type(ti, type, fields, ea, flags) -> bool Apply the specified type to the address
@param ti: Type info library. 'None' can be used. @param type: type_t const * @param fields: p_list const * @param ea: the address of the object @param flags: combination of TINFO_… constants or 0 @return: Boolean
def begin_type_updating(utp: update_type_t)-
begin_type_updating(utp) Mark the beginning of a large update operation on the types. Can be used with add_enum_member(), add_struc_member, etc… Also see end_type_updating()
@param utp: (C++: update_type_t) enum update_type_t
def calc_c_cpp_name(name: char const *, type: tinfo_t, ccn_flags: int)-
calc_c_cpp_name(name, type, ccn_flags) -> str Get C or C++ form of the name.
@param name: (C++: const char ) original (mangled or decorated) name @param type: (C++: const tinfo_t ) name type if known, otherwise nullptr @param ccn_flags: (C++: int) one of C/C++ naming flags
def calc_number_of_children(loc: argloc_t, tif: tinfo_t, dont_deref_ptr: bool = False) ‑> int-
calc_number_of_children(loc, tif, dont_deref_ptr=False) -> int Calculate max number of lines of a formatted c data, when expanded (PTV_EXPAND).
@param loc: (C++: const argloc_t &) location of the data (ALOC_STATIC or ALOC_CUSTOM) @param tif: (C++: const tinfo_t &) type info @param dont_deref_ptr: (C++: bool) consider 'ea' as the ptr value @retval 0: data is not expandable @retval -1: error, see qerrno @retval else: the max number of lines
def calc_tinfo_gaps(out: rangeset_t, typid: typid_t)-
calc_tinfo_gaps(out, typid) -> bool
@param out: rangeset_t * @param typid: typid_t
def calc_type_size(ti: til_t, tp: PyObject *)-
calc_type_size(ti, tp) -> PyObject * Returns the size of a type
@param ti: Type info library. 'None' can be passed. @param tp: serialized type byte string @return: - None on failure - The size of the type
def choose_local_tinfo(ti: til_t, title: char const *, func: local_tinfo_predicate_t * = None, def_ord: uint32 = 0, ud: void * = None)-
choose_local_tinfo(ti, title, func=None, def_ord=0, ud=None) -> uint32 Choose a type from the local type library.
@param ti: (C++: const til_t ) pointer to til @param title: (C++: const char ) title of listbox to display @param func: (C++: local_tinfo_predicate_t ) predicate to select types to display (maybe nullptr) @param def_ord: (C++: uint32) ordinal to position cursor before choose @param ud: (C++: void ) user data @return: == 0 means nothing is chosen, otherwise an ordinal number
def choose_local_tinfo_and_delta(delta: int32 *, ti: til_t, title: char const *, func: local_tinfo_predicate_t * = None, def_ord: uint32 = 0, ud: void * = None)-
choose_local_tinfo_and_delta(delta, ti, title, func=None, def_ord=0, ud=None) -> uint32 Choose a type from the local type library and specify the pointer shift value.
@param delta: (C++: int32 ) pointer shift value @param ti: (C++: const til_t ) pointer to til @param title: (C++: const char ) title of listbox to display @param func: (C++: local_tinfo_predicate_t ) predicate to select types to display (maybe nullptr) @param def_ord: (C++: uint32) ordinal to position cursor before choose @param ud: (C++: void *) user data @return: == 0 means nothing is chosen, otherwise an ordinal number
def choose_named_type(out_sym: til_symbol_t, root_til: til_t, title: char const *, ntf_flags: int, predicate: predicate_t = None)-
choose_named_type(out_sym, root_til, title, ntf_flags, predicate=None) -> bool Choose a type from a type library.
@param out_sym: (C++: til_symbol_t ) pointer to be filled with the chosen type @param root_til: (C++: const til_t ) pointer to starting til (the function will inspect the base tils if allowed by flags) @param title: (C++: const char ) title of listbox to display @param ntf_flags: (C++: int) combination of Flags for named types @param predicate: (C++: predicate_t ) predicate to select types to display (maybe nullptr) @return: false if nothing is chosen, otherwise true
def clear_tinfo_t(_this: tinfo_t)-
clear_tinfo_t(_this)
@param _this: tinfo_t *
def compact_til(ti: til_t) ‑> bool-
compact_til(ti) -> bool Collect garbage in til. Must be called before storing the til.
@param ti: (C++: til_t *) @return: true if any memory was freed
def compare_tinfo(t1: typid_t, t2: typid_t, tcflags: int)-
compare_tinfo(t1, t2, tcflags) -> bool
@param t1: typid_t @param t2: typid_t @param tcflags: int
def convert_pt_flags_to_hti(pt_flags: int) ‑> int-
convert_pt_flags_to_hti(pt_flags) -> int Convert Type parsing flags to Type formatting flags. Type parsing flags lesser than 0x10 don't have stable meaning and will be ignored (more on these flags can be seen in idc.idc)
@param pt_flags: (C++: int)
def copy_named_type(dsttil: til_t, srctil: til_t, name: char const *)-
copy_named_type(dsttil, srctil, name) -> uint32 Copy a named type from one til to another. This function will copy the specified type and all dependent types from the source type library to the destination library.
@param dsttil: (C++: til_t ) Destination til. It must have original types enabled @param srctil: (C++: const til_t ) Source til. @param name: (C++: const char *) name of the type to copy @return: ordinal number of the copied type. 0 means error
def copy_tinfo_t(_this: tinfo_t, r: tinfo_t)-
copy_tinfo_t(_this, r)
@param _this: tinfo_t * @param r: tinfo_t const &
def create_enum_type(enum_name: char const *, ei: enum_type_data_t, enum_width: int, sign: type_sign_t, convert_to_bitmask: bool, enum_cmt: char const * = None)-
create_enum_type(enum_name, ei, enum_width, sign, convert_to_bitmask, enum_cmt=None) -> tid_t Create type enum
@param enum_name: (C++: const char ) type name @param ei: (C++: enum_type_data_t &) enum type data @param enum_width: (C++: int) the width of an enum element allowed values: 0 (unspecified),1,2,4,8,16,32,64 @param sign: (C++: type_sign_t) enum sign @param convert_to_bitmask: (C++: bool) try convert enum to bitmask enum @param enum_cmt: (C++: const char ) enum type comment @return: enum TID
def create_numbered_type_name(ord: int32)-
create_numbered_type_name(ord) -> str Create anonymous name for numbered type. This name can be used to reference a numbered type by its ordinal Ordinal names have the following format: '#' + set_de(ord) Returns: -1 if error, otherwise the name length
@param ord: (C++: int32)
def create_tinfo(_this: tinfo_t, bt: type_t, bt2: type_t, ptr: void *)-
create_tinfo(_this, bt, bt2, ptr) -> bool
@param _this: tinfo_t * @param bt: type_t @param bt2: type_t @param ptr: void *
def default_compiler()-
default_compiler() -> comp_t Get compiler specified by inf.cc.
def del_named_type(ti: til_t, name: char const *, ntf_flags: int)-
del_named_type(ti, name, ntf_flags) -> bool Delete information about a symbol.
@param ti: (C++: til_t ) type library @param name: (C++: const char ) name of symbol @param ntf_flags: (C++: int) combination of Flags for named types @return: success
def del_numbered_type(ti: til_t, ordinal: uint32)-
del_numbered_type(ti, ordinal) -> bool Delete a numbered type.
@param ti: (C++: til_t *) @param ordinal: (C++: uint32)
def del_til(name: char const *)-
del_til(name) -> bool Unload a til file.
@param name: (C++: const char *) char const *
def del_tinfo_attr(tif: tinfo_t, key: qstring const &, make_copy: bool)-
del_tinfo_attr(tif, key, make_copy) -> bool
@param tif: tinfo_t * @param key: qstring const & @param make_copy: bool
def del_vftable_ea(ordinal: uint32)-
del_vftable_ea(ordinal) -> bool Delete the address of a vftable instance for a vftable type.
@param ordinal: (C++: uint32) ordinal number of a vftable type. @return: success
def deref_ptr(ptr_ea: ea_t *, tif: tinfo_t, closure_obj: ea_t * = None)-
deref_ptr(ptr_ea, tif, closure_obj=None) -> bool Dereference a pointer.
@param ptr_ea: (C++: ea_t ) in/out parameter * in: address of the pointer * out: the pointed address @param tif: (C++: const tinfo_t &) type of the pointer @param closure_obj: (C++: ea_t ) closure object (not used yet) @return: success
def deserialize_tinfo(tif: tinfo_t, til: til_t, ptype: type_t const **, pfields: p_list const **, pfldcmts: p_list const **, cmt: char const * = None)-
deserialize_tinfo(tif, til, ptype, pfields, pfldcmts, cmt=None) -> bool
@param tif: tinfo_t * @param til: til_t const * @param ptype: type_t const ** @param pfields: p_list const ** @param pfldcmts: p_list const ** @param cmt: char const *
def detach_tinfo_t(_this: tinfo_t) ‑> bool-
detach_tinfo_t(_this) -> bool
@param _this: tinfo_t *
def dstr_tinfo(tif: tinfo_t)-
dstr_tinfo(tif) -> char const *
@param tif: tinfo_t const *
def dump_func_type_data(fti: func_type_data_t, praloc_bits: int)-
dump_func_type_data(fti, praloc_bits) -> str Use func_type_data_t::dump()
@param fti: (C++: const func_type_data_t &) func_type_data_t const & @param praloc_bits: (C++: int)
def enable_numbered_types(ti: til_t, enable: bool) ‑> bool-
enable_numbered_types(ti, enable) -> bool Enable the use of numbered types in til. Currently it is impossible to disable numbered types once they are enabled
@param ti: (C++: til_t *) @param enable: (C++: bool)
def end_type_updating(utp: update_type_t)-
end_type_updating(utp) Mark the end of a large update operation on the types (see begin_type_updating())
@param utp: (C++: update_type_t) enum update_type_t
def extract_argloc(vloc: argloc_t, ptype: type_t const **, forbid_stkoff: bool)-
extract_argloc(vloc, ptype, forbid_stkoff) -> bool Deserialize an argument location. Argument FORBID_STKOFF checks location type. It can be used, for example, to check the return location of a function that cannot return a value in the stack
@param vloc: (C++: argloc_t ) @param ptype: (C++: const type_t *) type_t const ** @param forbid_stkoff: (C++: bool)
def find_tinfo_udt_member(udm: udm_t, typid: typid_t, strmem_flags: int)-
find_tinfo_udt_member(udm, typid, strmem_flags) -> int
@param udm: udm_t * @param typid: typid_t @param strmem_flags: int
def first_named_type(ti: til_t, ntf_flags: int)-
first_named_type(ti, ntf_flags) -> char const * Enumerate types.
@param ti: (C++: const til_t *) type library. nullptr means the local type library for the current database. @param ntf_flags: (C++: int) combination of Flags for named types @return: Type or symbol names, depending of ntf_flags. Returns mangled names. Never returns anonymous types. To include them, enumerate types by ordinals.
def for_all_arglocs(vv: aloc_visitor_t, vloc: argloc_t, size: int, off: int = 0) ‑> int-
for_all_arglocs(vv, vloc, size, off=0) -> int Compress larger argloc types and initiate the aloc visitor.
@param vv: (C++: aloc_visitor_t &) @param vloc: (C++: argloc_t &) @param size: (C++: int) @param off: (C++: int)
def for_all_const_arglocs(vv: const_aloc_visitor_t, vloc: argloc_t, size: int, off: int = 0) ‑> int-
for_all_const_arglocs(vv, vloc, size, off=0) -> int See for_all_arglocs()
@param vv: (C++: const_aloc_visitor_t &) @param vloc: (C++: const argloc_t &) argloc_t const & @param size: (C++: int) @param off: (C++: int)
def free_til(ti: til_t)-
free_til(ti) Free memory allocated by til.
@param ti: (C++: til_t *)
def func_has_stkframe_hole(ea: ea_t, fti: func_type_data_t)-
func_has_stkframe_hole(ea, fti) -> bool Looks for a hole at the beginning of the stack arguments. Will make use of the IDB's func_t function at that place (if present) to help determine the presence of such a hole.
@param ea: (C++: ea_t) @param fti: (C++: const func_type_data_t &) func_type_data_t const &
def gcc_layout() ‑> bool-
gcc_layout() -> bool Should use the struct/union layout as done by gcc?
def gen_decorate_name(name: char const *, mangle: bool, cc: cm_t, type: tinfo_t)-
gen_decorate_name(name, mangle, cc, type) -> str Generic function for decorate_name() (may be used in IDP modules)
@param name: (C++: const char ) char const * @param mangle: (C++: bool) @param cc: (C++: cm_t) @param type: (C++: const tinfo_t ) tinfo_t const *
def gen_use_arg_tinfos(_this: argtinfo_helper_t, caller: ea_t, fti: func_type_data_t, rargs: funcargvec_t)-
gen_use_arg_tinfos(_this, caller, fti, rargs) Do not call this function directly, use argtinfo_helper_t.
@param _this: (C++: struct argtinfo_helper_t ) argtinfo_helper_t * @param caller: (C++: ea_t) @param fti: (C++: func_type_data_t ) @param rargs: (C++: funcargvec_t *)
def get_abi_name()-
get_abi_name() -> str Get ABI name.
@return: length of the name (>=0)
def get_alias_target(ti: til_t, ordinal: uint32)-
get_alias_target(ti, ordinal) -> uint32 Find the final alias destination. If the ordinal has not been aliased, return the specified ordinal itself If failed, returns 0.
@param ti: (C++: const til_t *) til_t const * @param ordinal: (C++: uint32)
def get_arg_addrs(caller: ea_t)-
get_arg_addrs(caller) -> PyObject * Retrieve addresses of argument initialization instructions
@param caller: the address of the call instruction @return: list of instruction addresses
def get_base_type(t: type_t)-
get_base_type(t) -> type_t Get get basic type bits (TYPE_BASE_MASK)
@param t: (C++: type_t)
def get_c_header_path()-
get_c_header_path() -> str Get the include directory path of the target compiler.
def get_c_macros()-
get_c_macros() -> str Get predefined macros for the target compiler.
def get_comp(comp: comp_t)-
get_comp(comp) -> comp_t Get compiler bits.
@param comp: (C++: comp_t)
def get_compiler_abbr(id: comp_t)-
get_compiler_abbr(id) -> char const * Get abbreviated compiler name.
@param id: (C++: comp_t)
def get_compiler_name(id: comp_t)-
get_compiler_name(id) -> char const * Get full compiler name.
@param id: (C++: comp_t)
def get_compilers(ids: compvec_t *, names: qstrvec_t *, abbrs: qstrvec_t *)-
get_compilers(ids, names, abbrs) Get names of all built-in compilers.
@param ids: (C++: compvec_t ) @param names: (C++: qstrvec_t ) @param abbrs: (C++: qstrvec_t *)
def get_enum_member_expr(tif: tinfo_t, serial: int, value: uint64)-
get_enum_member_expr(tif, serial, value) -> str Return a C expression that can be used to represent an enum member. If the value does not correspond to any single enum member, this function tries to find a bitwise combination of enum members that correspond to it. If more than half of value bits do not match any enum members, it fails.
@param tif: (C++: const tinfo_t &) enumeration type @param serial: (C++: int) which enumeration member to use (0 means the first with the given value) @param value: (C++: uint64) value to search in the enumeration type @return: success
def get_full_type(t: type_t)-
get_full_type(t) -> type_t Get basic type bits + type flags (TYPE_FULL_MASK)
@param t: (C++: type_t)
def get_idainfo_by_type(tif: tinfo_t)-
get_idainfo_by_type(tif) -> bool Extract information from a tinfo_t.
@param tif: (C++: const tinfo_t &) the type to inspect
def get_idainfo_by_udm(*args) ‑> bool-
get_idainfo_by_udm(flags, ti, udm, refinfo_ea=BADADDR) -> bool Calculate IDA info from udt member
@param flags: (C++: flags64_t ) [out]: flags (see bytes.hpp) for udt member @param ti: (C++: opinfo_t ) [out]: additional representation information, see set_opinfo() @param udm: (C++: const udm_t &) udt member @param refinfo_ea: (C++: ea_t) if specified will be used to adjust the refinfo_t data @note: any output argument may be nullptr
def get_idati()-
get_idati() -> til_t Pointer to the local type library - this til is private for each IDB file Functions that accept til_t* default to
idatiwhen is nullptr provided. def get_named_type(til: til_t, name: char const *, ntf_flags: int)-
get_named_type(til, name, ntf_flags) -> (int, bytes, bytes, NoneType, NoneType, int, int) Get a type data by its name.
@param til: the type library @param name: the type name @param ntf_flags: a combination of NTF_* constants @return: None on failure tuple(code, type_str, fields_str, cmt, field_cmts, sclass, value) on success
def get_named_type64(til: til_t, name: char const *, ntf_flags: int)-
get_named_type64(til, name, ntf_flags) -> (int, bytes, NoneType, NoneType, NoneType, int, int) See get_named_type() above. @note: If the value in the 'ti' library is 32-bit, it will be sign-extended before being stored in the 'value' pointer.
@param til: til_t const * @param name: (C++: const char *) char const * @param ntf_flags: (C++: int)
def get_named_type_tid(name: char const *)-
get_named_type_tid(name) -> tid_t Get named local type TID
@param name: (C++: const char *) type name @return: TID or BADADDR
def get_numbered_type(til: til_t, ordinal: uint32)-
get_numbered_type(til, ordinal) -> (bytes, NoneType, NoneType, NoneType, int), (bytes, bytes, NoneType, NoneType, int) Retrieve a type by its ordinal number.
@param til: til_t const * @param ordinal: (C++: uint32)
def get_numbered_type_name(ti: til_t, ordinal: uint32)-
get_numbered_type_name(ti, ordinal) -> char const * Get type name (if exists) by its ordinal. If the type is anonymous, returns "". If failed, returns nullptr
@param ti: (C++: const til_t *) til_t const * @param ordinal: (C++: uint32)
def get_ordinal_count(ti: til_t = None)-
get_ordinal_count(ti=None) -> uint32 Get number of allocated ordinals.
@param ti: (C++: const til_t *) type library; nullptr means the local types for the current database. @return: 0 if ordinals have not been enabled for the til.
def get_ordinal_limit(ti: til_t = None)-
get_ordinal_limit(ti=None) -> uint32 Get number of allocated ordinals + 1. If there are no allocated ordinals, return 0. To enumerate all ordinals, use: for ( uint32 i = 1; i < limit; ++i )
@param ti: (C++: const til_t *) type library; nullptr means the local types for the current database. @return: uint32(-1) if ordinals have not been enabled for the til. For local types (idati), ordinals are always enabled.
def get_scalar_bt(size: int)-
get_scalar_bt(size) -> type_t
@param size: int
def get_stock_tinfo(tif: tinfo_t, id: stock_type_id_t)-
get_stock_tinfo(tif, id) -> bool
@param tif: tinfo_t * @param id: enum stock_type_id_t
def get_tid_name(tid: tid_t)-
get_tid_name(tid) -> str Get a type name for the specified TID
@param tid: (C++: tid_t) type TID @return: true if there is type with TID @note: this function is the inverse to get_named_type_tid
def get_tid_ordinal(tid: tid_t)-
get_tid_ordinal(tid) -> uint32 Get type ordinal number for TID
@param tid: (C++: tid_t) type/enum constant/udt member TID @return: type ordinal number or 0
def get_tinfo_attr(typid: typid_t, key: qstring const &, bv: bytevec_t *, all_attrs: bool)-
get_tinfo_attr(typid, key, bv, all_attrs) -> bool
@param typid: typid_t @param key: qstring const & @param bv: bytevec_t * @param all_attrs: bool
def get_tinfo_attrs(typid: typid_t, tav: type_attrs_t, include_ref_attrs: bool)-
get_tinfo_attrs(typid, tav, include_ref_attrs) -> bool
@param typid: typid_t @param tav: type_attrs_t * @param include_ref_attrs: bool
def get_tinfo_by_edm_name(tif: tinfo_t, til: til_t, mname: char const *)-
get_tinfo_by_edm_name(tif, til, mname) -> ssize_t
@param tif: tinfo_t * @param til: til_t const * @param mname: char const *
def get_tinfo_by_flags(out: tinfo_t, flags: flags64_t)-
get_tinfo_by_flags(out, flags) -> bool Get tinfo object that corresponds to data flags
@param out: (C++: tinfo_t *) type info @param flags: (C++: flags64_t) simple flags (byte, word, …, zword)
def get_tinfo_details(typid: typid_t, bt2: type_t, buf: void *)-
get_tinfo_details(typid, bt2, buf) -> bool
@param typid: typid_t @param bt2: type_t @param buf: void *
def get_tinfo_pdata(outptr: void *, typid: typid_t, what: int)-
get_tinfo_pdata(outptr, typid, what) -> size_t
@param outptr: void * @param typid: typid_t @param what: int
def get_tinfo_property(typid: typid_t, gta_prop: int)-
get_tinfo_property(typid, gta_prop) -> size_t
@param typid: typid_t @param gta_prop: int
def get_tinfo_property4(typid: typid_t, gta_prop: int, p1: size_t, p2: size_t, p3: size_t, p4: size_t)-
get_tinfo_property4(typid, gta_prop, p1, p2, p3, p4) -> size_t
@param typid: typid_t @param gta_prop: int @param p1: size_t @param p2: size_t @param p3: size_t @param p4: size_t
def get_tinfo_size(p_effalign: uint32 *, typid: typid_t, gts_code: int)-
get_tinfo_size(p_effalign, typid, gts_code) -> size_t
@param p_effalign: uint32 * @param typid: typid_t @param gts_code: int
def get_type_flags(t: type_t)-
get_type_flags(t) -> type_t Get type flags (TYPE_FLAGS_MASK)
@param t: (C++: type_t)
def get_type_ordinal(ti: til_t, name: char const *)-
get_type_ordinal(ti, name) -> int32 Get type ordinal by its name.
@param ti: (C++: const til_t ) til_t const * @param name: (C++: const char ) char const *
def get_udm_by_fullname(udm: udm_t, fullname: char const *)-
get_udm_by_fullname(udm, fullname) -> ssize_t Get udt member by full name
@param udm: (C++: udm_t ) member, can be NULL @param fullname: (C++: const char ) udt member name in format
. @return: member index into udt_type_data_t or -1 def get_vftable_ea(ordinal: uint32)-
get_vftable_ea(ordinal) -> ea_t Get address of a virtual function table.
@param ordinal: (C++: uint32) ordinal number of a vftable type. @return: address of the corresponding virtual function table in the current database.
def get_vftable_ordinal(vftable_ea: ea_t)-
get_vftable_ordinal(vftable_ea) -> uint32 Get ordinal number of the virtual function table.
@param vftable_ea: (C++: ea_t) address of a virtual function table. @return: ordinal number of the corresponding vftable type. 0 - failure.
def guess_func_cc(fti: func_type_data_t, npurged: int, cc_flags: int)-
guess_func_cc(fti, npurged, cc_flags) -> cm_t Use func_type_data_t::guess_cc()
@param fti: (C++: const func_type_data_t &) func_type_data_t const & @param npurged: (C++: int) @param cc_flags: (C++: int)
def guess_tinfo(out: tinfo_t, id: tid_t)-
guess_tinfo(out, id) -> int Generate a type information about the id from the disassembly. id can be a structure/union/enum id or an address.
@param out: (C++: tinfo_t *) @param id: (C++: tid_t) @return: one of Guess tinfo codes
def idc_get_local_type(ordinal: int, flags: int)-
idc_get_local_type(ordinal, flags) -> str
@param ordinal: int @param flags: int
def idc_get_local_type_name(ordinal: int)-
idc_get_local_type_name(ordinal) -> str
@param ordinal: int
def idc_get_local_type_raw(ordinal: int)-
idc_get_local_type_raw(ordinal) -> (bytes, bytes)
@param ordinal: int
def idc_get_type(ea: ea_t)-
idc_get_type(ea) -> str
@param ea: ea_t
def idc_get_type_raw(ea: ea_t)-
idc_get_type_raw(ea) -> PyObject *
@param ea: ea_t
def idc_guess_type(ea: ea_t)-
idc_guess_type(ea) -> str
@param ea: ea_t
def idc_parse_decl(ti: til_t, decl: char const *, flags: int)-
idc_parse_decl(ti, decl, flags) -> (str, bytes, bytes) or None
@param ti: til_t * @param decl: char const * @param flags: int
def idc_parse_types(input: char const *, flags: int)-
idc_parse_types(input, flags) -> int
@param input: char const * @param flags: int
def idc_print_type(type: type_t const *, fields: p_list const *, name: char const *, flags: int)-
idc_print_type(type, fields, name, flags) -> str
@param type: type_t const * @param fields: p_list const * @param name: char const * @param flags: int
def idc_set_local_type(ordinal: int, dcl: char const *, flags: int)-
idc_set_local_type(ordinal, dcl, flags) -> int
@param ordinal: int @param dcl: char const * @param flags: int
def inf_big_arg_align(*args) ‑> bool-
inf_big_arg_align() -> bool inf_big_arg_align(cc) -> bool
@param cc: cm_t
def inf_huge_arg_align(*args) ‑> bool-
inf_huge_arg_align() -> bool inf_huge_arg_align(cc) -> bool
@param cc: cm_t
def inf_pack_stkargs(*args) ‑> bool-
inf_pack_stkargs() -> bool inf_pack_stkargs(cc) -> bool
@param cc: cm_t
def is_code_far(cm: cm_t)-
is_code_far(cm) -> bool Does the given model specify far code?.
@param cm: (C++: cm_t)
def is_comp_unsure(comp: comp_t)-
is_comp_unsure(comp) -> comp_t See COMP_UNSURE.
@param comp: (C++: comp_t)
def is_data_far(cm: cm_t)-
is_data_far(cm) -> bool Does the given model specify far data?.
@param cm: (C++: cm_t)
def is_gcc() ‑> bool-
is_gcc() -> bool Is the target compiler COMP_GNU?
def is_gcc32() ‑> bool-
is_gcc32() -> bool Is the target compiler 32 bit gcc?
def is_gcc64() ‑> bool-
is_gcc64() -> bool Is the target compiler 64 bit gcc?
def is_golang_cc(cc: cm_t)-
is_golang_cc(cc) -> bool GO language calling convention (return value in stack)?
@param cc: (C++: cm_t)
def is_one_bit_mask(mask: uval_t)-
is_one_bit_mask(mask) -> bool Is bitmask one bit?
@param mask: (C++: uval_t)
def is_ordinal_name(name: char const *, ord: uint32 * = None)-
is_ordinal_name(name, ord=None) -> bool Check if the name is an ordinal name. Ordinal names have the following format: '#' + set_de(ord)
@param name: (C++: const char ) char const * @param ord: (C++: uint32 )
def is_purging_cc(cm: cm_t)-
is_purging_cc(cm) -> bool Does the calling convention clean the stack arguments upon return?. @note: this function is valid only for x86 code
@param cm: (C++: cm_t)
def is_restype_enum(til: til_t, type: type_t const *)-
is_restype_enum(til, type) -> bool
@param til: til_t const * @param type: type_t const *
def is_restype_struct(til: til_t, type: type_t const *)-
is_restype_struct(til, type) -> bool
@param til: til_t const * @param type: type_t const *
def is_restype_struni(til: til_t, type: type_t const *)-
is_restype_struni(til, type) -> bool
@param til: til_t const * @param type: type_t const *
def is_restype_void(til: til_t, type: type_t const *)-
is_restype_void(til, type) -> bool
@param til: til_t const * @param type: type_t const *
def is_sdacl_byte(t: type_t)-
is_sdacl_byte(t) -> bool Identify an sdacl byte. The first sdacl byte has the following format: 11xx000x. The sdacl bytes are appended to udt fields. They indicate the start of type attributes (as the tah-bytes do). The sdacl bytes are used in the udt headers instead of the tah-byte. This is done for compatibility with old databases, they were already using sdacl bytes in udt headers and as udt field postfixes. (see "sdacl-typeattrs" in the type bit definitions)
@param t: (C++: type_t)
def is_swift_cc(cc: cm_t)-
is_swift_cc(cc) -> bool Swift calling convention (arguments and return values in registers)?
@param cc: (C++: cm_t)
def is_tah_byte(t: type_t)-
is_tah_byte(t) -> bool The TAH byte (type attribute header byte) denotes the start of type attributes. (see "tah-typeattrs" in the type bit definitions)
@param t: (C++: type_t)
def is_type_arithmetic(t: type_t)-
is_type_arithmetic(t) -> bool Is the type an arithmetic type? (floating or integral)
@param t: (C++: type_t)
def is_type_array(t: type_t)-
is_type_array(t) -> bool See BT_ARRAY.
@param t: (C++: type_t)
def is_type_bitfld(t: type_t)-
is_type_bitfld(t) -> bool See BT_BITFIELD.
@param t: (C++: type_t)
def is_type_bool(t: type_t)-
is_type_bool(t) -> bool See BTF_BOOL.
@param t: (C++: type_t)
def is_type_char(t: type_t)-
is_type_char(t) -> bool Does the type specify a char value? (signed or unsigned, see Basic type: integer)
@param t: (C++: type_t)
def is_type_choosable(ti: til_t, ordinal: uint32)-
is_type_choosable(ti, ordinal) -> bool Check if a struct/union type is choosable
@param ti: (C++: const til_t *) type library @param ordinal: (C++: uint32) ordinal number of a UDT type
def is_type_complex(t: type_t)-
is_type_complex(t) -> bool See BT_COMPLEX.
@param t: (C++: type_t)
def is_type_const(t: type_t)-
is_type_const(t) -> bool See BTM_CONST.
@param t: (C++: type_t)
def is_type_double(t: type_t)-
is_type_double(t) -> bool See BTF_DOUBLE.
@param t: (C++: type_t)
def is_type_enum(t: type_t)-
is_type_enum(t) -> bool See BTF_ENUM.
@param t: (C++: type_t)
def is_type_ext_arithmetic(t: type_t)-
is_type_ext_arithmetic(t) -> bool Is the type an extended arithmetic type? (arithmetic or enum)
@param t: (C++: type_t)
def is_type_ext_integral(t: type_t)-
is_type_ext_integral(t) -> bool Is the type an extended integral type? (integral or enum)
@param t: (C++: type_t)
def is_type_float(t: type_t)-
is_type_float(t) -> bool See BTF_FLOAT.
@param t: (C++: type_t)
def is_type_floating(t: type_t)-
is_type_floating(t) -> bool Is the type a floating point type?
@param t: (C++: type_t)
def is_type_func(t: type_t)-
is_type_func(t) -> bool See BT_FUNC.
@param t: (C++: type_t)
def is_type_int(bt: type_t)-
is_type_int(bt) -> bool Does the type_t specify one of the basic types in Basic type: integer?
@param bt: (C++: type_t)
def is_type_int128(t: type_t)-
is_type_int128(t) -> bool Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer)
@param t: (C++: type_t)
def is_type_int16(t: type_t)-
is_type_int16(t) -> bool Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer)
@param t: (C++: type_t)
def is_type_int32(t: type_t)-
is_type_int32(t) -> bool Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer)
@param t: (C++: type_t)
def is_type_int64(t: type_t)-
is_type_int64(t) -> bool Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer)
@param t: (C++: type_t)
def is_type_integral(t: type_t)-
is_type_integral(t) -> bool Is the type an integral type (char/short/int/long/bool)?
@param t: (C++: type_t)
def is_type_ldouble(t: type_t)-
is_type_ldouble(t) -> bool See BTF_LDOUBLE.
@param t: (C++: type_t)
def is_type_paf(t: type_t)-
is_type_paf(t) -> bool Is the type a pointer, array, or function type?
@param t: (C++: type_t)
def is_type_partial(t: type_t)-
is_type_partial(t) -> bool Identifies an unknown or void type with a known size (see Basic type: unknown & void)
@param t: (C++: type_t)
def is_type_ptr(t: type_t)-
is_type_ptr(t) -> bool See BT_PTR.
@param t: (C++: type_t)
def is_type_ptr_or_array(t: type_t)-
is_type_ptr_or_array(t) -> bool Is the type a pointer or array type?
@param t: (C++: type_t)
def is_type_struct(t: type_t)-
is_type_struct(t) -> bool See BTF_STRUCT.
@param t: (C++: type_t)
def is_type_struni(t: type_t)-
is_type_struni(t) -> bool Is the type a struct or union?
@param t: (C++: type_t)
def is_type_sue(t: type_t)-
is_type_sue(t) -> bool Is the type a struct/union/enum?
@param t: (C++: type_t)
def is_type_tbyte(t: type_t)-
is_type_tbyte(t) -> bool See BTF_FLOAT.
@param t: (C++: type_t)
def is_type_typedef(t: type_t)-
is_type_typedef(t) -> bool See BTF_TYPEDEF.
@param t: (C++: type_t)
def is_type_uchar(t: type_t)-
is_type_uchar(t) -> bool See BTF_UCHAR.
@param t: (C++: type_t)
def is_type_uint(t: type_t)-
is_type_uint(t) -> bool See BTF_UINT.
@param t: (C++: type_t)
def is_type_uint128(t: type_t)-
is_type_uint128(t) -> bool See BTF_UINT128.
@param t: (C++: type_t)
def is_type_uint16(t: type_t)-
is_type_uint16(t) -> bool See BTF_UINT16.
@param t: (C++: type_t)
def is_type_uint32(t: type_t)-
is_type_uint32(t) -> bool See BTF_UINT32.
@param t: (C++: type_t)
def is_type_uint64(t: type_t)-
is_type_uint64(t) -> bool See BTF_UINT64.
@param t: (C++: type_t)
def is_type_union(t: type_t)-
is_type_union(t) -> bool See BTF_UNION.
@param t: (C++: type_t)
def is_type_unknown(t: type_t)-
is_type_unknown(t) -> bool See BT_UNKNOWN.
@param t: (C++: type_t)
def is_type_void(t: type_t)-
is_type_void(t) -> bool See BTF_VOID.
@param t: (C++: type_t)
def is_type_volatile(t: type_t)-
is_type_volatile(t) -> bool See BTM_VOLATILE.
@param t: (C++: type_t)
def is_typeid_last(t: type_t)-
is_typeid_last(t) -> bool Is the type_t the last byte of type declaration? (there are no additional bytes after a basic type, see _BT_LAST_BASIC)
@param t: (C++: type_t)
def is_user_cc(cm: cm_t)-
is_user_cc(cm) -> bool Does the calling convention specify argument locations explicitly?
@param cm: (C++: cm_t)
def is_vararg_cc(cm: cm_t)-
is_vararg_cc(cm) -> bool Does the calling convention use ellipsis?
@param cm: (C++: cm_t)
def lexcompare_tinfo(t1: typid_t, t2: typid_t, arg3: int)-
lexcompare_tinfo(t1, t2, arg3) -> int
@param t1: typid_t @param t2: typid_t @param arg3: int
def load_til(name: char const *, tildir: char const * = None)-
load_til(name, tildir=None) -> til_t Load til from a file without adding it to the database list (see also add_til). Failure to load base tils are reported into 'errbuf'. They do not prevent loading of the main til.
@param name: (C++: const char ) filename of the til. If it's an absolute path, tildir is ignored. * NB: the file extension is forced to .til @param tildir: (C++: const char ) directory where to load the til from. nullptr means default til subdirectories. @return: pointer to resulting til, nullptr if failed and error message is in errbuf
def load_til_header(tildir: char const *, name: char const *)-
load_til_header(tildir, name) -> til_t Get human-readable til description.
@param tildir: (C++: const char ) char const * @param name: (C++: const char ) char const *
def lower_type(til: til_t, tif: tinfo_t, name: char const * = None)-
lower_type(til, tif, name=None, _helper=None) -> int Lower type. Inspect the type and lower all function subtypes using lower_func_type(). We call the prototypes usually encountered in source files "high level" They may have implicit arguments, array arguments, big structure retvals, etc We introduce explicit arguments (i.e. 'this' pointer) and call the result "low level prototype". See FTI_HIGH.
In order to improve heuristics for recognition of big structure retvals, it is recommended to pass a helper that will be used to make decisions. That helper will be used only for lowering 'tif', and not for the children types walked through by recursion. @retval 1: removed FTI_HIGH, @retval 2: made substantial changes @retval -1: failure
@param til: (C++: til_t ) @param tif: (C++: tinfo_t ) @param name: (C++: const char ) char const * @param _helper: (C++: lowertype_helper_t )
def new_til(name: char const *, desc: char const *)-
new_til(name, desc) -> til_t Initialize a til.
@param name: (C++: const char ) char const * @param desc: (C++: const char ) char const *
def next_named_type(ti: til_t, name: char const *, ntf_flags: int)-
next_named_type(ti, name, ntf_flags) -> char const * Enumerate types.
@param ti: (C++: const til_t ) type library. nullptr means the local type library for the current database. @param name: (C++: const char ) the current name. the name that follows this one will be returned. @param ntf_flags: (C++: int) combination of Flags for named types @return: Type or symbol names, depending of ntf_flags. Returns mangled names. Never returns anonymous types. To include them, enumerate types by ordinals.
def optimize_argloc(vloc: argloc_t, size: int, gaps: rangeset_t)-
optimize_argloc(vloc, size, gaps) -> bool Verify and optimize scattered argloc into simple form. All new arglocs must be processed by this function. @retval true: success @retval false: the input argloc was illegal
@param vloc: (C++: argloc_t ) @param size: (C++: int) @param gaps: (C++: const rangeset_t ) rangeset_t const *
def pack_idcobj_to_bv(obj: idc_value_t const *, tif: tinfo_t, bytes: relobj_t, objoff: void *, pio_flags: int = 0)-
pack_idcobj_to_bv(obj, tif, bytes, objoff, pio_flags=0) -> error_t Write a typed idc object to the byte vector. Byte vector may be non-empty, this function will append data to it
@param obj: (C++: const idc_value_t ) idc_value_t const * @param tif: (C++: const tinfo_t &) tinfo_t const & @param bytes: (C++: relobj_t ) @param objoff: (C++: void *) @param pio_flags: (C++: int)
def pack_idcobj_to_idb(obj: idc_value_t const *, tif: tinfo_t, ea: ea_t, pio_flags: int = 0)-
pack_idcobj_to_idb(obj, tif, ea, pio_flags=0) -> error_t Write a typed idc object to the database.
@param obj: (C++: const idc_value_t *) idc_value_t const * @param tif: (C++: const tinfo_t &) tinfo_t const & @param ea: (C++: ea_t) @param pio_flags: (C++: int)
def pack_object_to_bv(py_obj: PyObject *, ti: til_t, type: type_t const *, fields: p_list const *, base_ea: ea_t, pio_flags: int = 0)-
pack_object_to_bv(py_obj, ti, type, fields, base_ea, pio_flags=0) -> PyObject Packs a typed object to a string
@param py_obj: PyObject * @param ti: Type info. 'None' can be passed. @param type: type_t const * @param fields: fields string (may be empty or None) @param base_ea: base ea used to relocate the pointers in the packed object @param pio_flags: flags used while unpacking @return: tuple(0, err_code) on failure tuple(1, packed_buf) on success
def pack_object_to_idb(py_obj: PyObject *, ti: til_t, type: type_t const *, fields: p_list const *, ea: ea_t, pio_flags: int = 0)-
pack_object_to_idb(py_obj, ti, type, fields, ea, pio_flags=0) -> PyObject Write a typed object to the database. Raises an exception if wrong parameters were passed or conversion fails Returns the error_t returned by idaapi.pack_object_to_idb
@param py_obj: PyObject * @param ti: Type info. 'None' can be passed. @param type: type_t const * @param fields: fields string (may be empty or None) @param ea: ea to be used while packing @param pio_flags: flags used while unpacking
def parse_decl(out_tif: tinfo_t, til: til_t, decl: char const *, pt_flags: int)-
parse_decl(out_tif, til, decl, pt_flags) -> str Parse ONE declaration. If the input string contains more than one declaration, the first complete type declaration (PT_TYP) or the last variable declaration (PT_VAR) will be used. @note: name & tif may be empty after the call!
@param out_tif: (C++: tinfo_t ) type info @param til: (C++: til_t ) type library to use. may be nullptr @param decl: (C++: const char *) C declaration to parse @param pt_flags: (C++: int) combination of Type parsing flags bits @retval true: ok @retval false: declaration is bad, the error message is displayed if !PT_SIL
def parse_decls(til: til_t, input: char const *, printer: printer_t *, hti_flags: int)-
parse_decls(til, input, printer, hti_flags) -> int Parse many declarations and store them in a til. If there are any errors, they will be printed using 'printer'. This function uses default include path and predefined macros from the database settings. It always uses the HTI_DCL bit.
@param til: (C++: til_t ) type library to store the result @param input: (C++: const char ) input string or file name (see hti_flags) @param printer: (C++: printer_t *) function to output error messages (use msg or nullptr or your own callback) @param hti_flags: (C++: int) combination of Type formatting flags @return: number of errors, 0 means ok.
def print_argloc(vloc: argloc_t, size: int = 0, vflags: int = 0)-
print_argloc(vloc, size=0, vflags=0) -> size_t Convert an argloc to human readable form.
@param vloc: (C++: const argloc_t &) argloc_t const & @param size: (C++: int) @param vflags: (C++: int)
def print_decls(printer: text_sink_t, til: til_t, py_ordinals: PyObject *, flags: uint32)-
print_decls(printer, til, py_ordinals, flags) -> int Print types (and possibly their dependencies) in a format suitable for using in a header file. This is the reverse parse_decls().
@param printer: (C++: text_sink_t &) a handler for printing text @param til: (C++: const til_t *) the type library holding the ordinals @param py_ordinals: ordinals of types to export. nullptr means: all ordinals in til @param pdf_flags: (C++: uint32) flags for the algorithm. A combination of PDF_ constants @retval >0: the number of types exported @retval 0: an error occurred @retval <0: the negated number of types exported. There were minor errors and the resulting output might not be compilable.
def print_tinfo(prefix: char const *, indent: int, cmtindent: int, flags: int, tif: tinfo_t, name: char const *, cmt: char const *)-
print_tinfo(prefix, indent, cmtindent, flags, tif, name, cmt) -> str
@param prefix: char const * @param indent: int @param cmtindent: int @param flags: int @param tif: tinfo_t const * @param name: char const * @param cmt: char const *
def print_type(ea: ea_t, prtype_flags: int)-
print_type(ea, prtype_flags) -> str Get type declaration for the specified address.
@param ea: (C++: ea_t) address @param prtype_flags: (C++: int) combination of Type printing flags @return: success
def read_tinfo_bitfield_value(typid: typid_t, v: uint64, bitoff: int)-
read_tinfo_bitfield_value(typid, v, bitoff) -> uint64
@param typid: typid_t @param v: uint64 @param bitoff: int
def remove_abi_opts(abi_opts: char const *, user_level: bool = False)-
remove_abi_opts(abi_opts, user_level=False) -> bool
@param abi_opts: char const * @param user_level: bool
def remove_pointer(tif: tinfo_t) ‑> tinfo_t-
remove_pointer(tif) -> tinfo_t
@param BT_PTR: If the current type is a pointer, return the pointed object. If the current type is not a pointer, return the current type. See also get_ptrarr_object() and get_pointed_object()
def remove_tinfo_pointer(tif: tinfo_t, name: char const *, til: til_t)-
remove_tinfo_pointer(tif, name, til) -> (bool, NoneType), (bool, str) Remove pointer of a type. (i.e. convert "char *" into "char"). Optionally remove the "lp" (or similar) prefix of the input name. If the input type is not a pointer, then fail.
@param tif: (C++: tinfo_t ) @param name: char const * @param til: (C++: const til_t ) til_t const *
def replace_ordinal_typerefs(til: til_t, tif: tinfo_t) ‑> int-
replace_ordinal_typerefs(til, tif) -> int Replace references to ordinal types by name references. This function 'unties' the type from the current local type library and makes it easier to export it.
@param til: (C++: til_t ) type library to use. may be nullptr. @param tif: (C++: tinfo_t ) type to modify (in/out) @retval number: of replaced subtypes, -1 on failure
def resolve_typedef(til: til_t, type: type_t const *)-
resolve_typedef(til, type) -> type_t const *
@param til: til_t const * @param type: type_t const *
def save_tinfo(tif: tinfo_t, til: til_t, ord: size_t, name: char const *, ntf_flags: int)-
save_tinfo(tif, til, ord, name, ntf_flags) -> tinfo_code_t
@param tif: tinfo_t * @param til: til_t * @param ord: size_t @param name: char const * @param ntf_flags: int
def score_tinfo(tif: tinfo_t)-
score_tinfo(tif) -> uint32
@param tif: tinfo_t const *
def serialize_tinfo(type: qtype *, fields: qtype *, fldcmts: qtype *, tif: tinfo_t, sudt_flags: int)-
serialize_tinfo(type, fields, fldcmts, tif, sudt_flags) -> bool
@param type: qtype * @param fields: qtype * @param fldcmts: qtype * @param tif: tinfo_t const * @param sudt_flags: int
def set_abi_name(abiname: char const *, user_level: bool = False)-
set_abi_name(abiname, user_level=False) -> bool Set abi name (see Compiler IDs)
@param abiname: (C++: const char *) char const * @param user_level: (C++: bool)
def set_c_header_path(incdir: char const *)-
set_c_header_path(incdir) Set include directory path the target compiler.
@param incdir: (C++: const char *) char const *
def set_c_macros(macros: char const *)-
set_c_macros(macros) Set predefined macros for the target compiler.
@param macros: (C++: const char *) char const *
def set_compiler(cc: compiler_info_t, flags: int, abiname: char const * = None)-
set_compiler(cc, flags, abiname=None) -> bool Change current compiler.
@param cc: (C++: const compiler_info_t &) compiler to switch to @param flags: (C++: int) Set compiler flags @param abiname: (C++: const char *) ABI name @return: success
def set_compiler_id(id: comp_t, abiname: char const * = None)-
set_compiler_id(id, abiname=None) -> bool Set the compiler id (see Compiler IDs)
@param id: (C++: comp_t) @param abiname: (C++: const char *) char const *
def set_compiler_string(compstr: char const *, user_level: bool)-
set_compiler_string(compstr, user_level) -> bool
@param compstr: (C++: const char *) - compiler description in form :
@param user_level: (C++: bool) - initiated by user if TRUE @return: success def set_numbered_type(ti: til_t, ordinal: uint32, ntf_flags: int, name: char const *, type: type_t const *, fields: p_list const * = None, cmt: char const * = None, fldcmts: p_list const * = None, sclass: sclass_t const * = None)-
set_numbered_type(ti, ordinal, ntf_flags, name, type, fields=None, cmt=None, fldcmts=None, sclass=None) -> tinfo_code_t
@param ti: til_t * @param ordinal: uint32 @param ntf_flags: int @param name: char const * @param type: type_t const * @param fields: p_list const * @param cmt: char const * @param fldcmts: p_list const * @param sclass: sclass_t const *
def set_tinfo_attr(tif: tinfo_t, ta: type_attr_t, may_overwrite: bool) ‑> bool-
set_tinfo_attr(tif, ta, may_overwrite) -> bool
@param tif: tinfo_t * @param ta: type_attr_t const & @param may_overwrite: bool
def set_tinfo_attrs(tif: tinfo_t, ta: type_attrs_t) ‑> bool-
set_tinfo_attrs(tif, ta) -> bool
@param tif: tinfo_t * @param ta: type_attrs_t *
def set_tinfo_property(tif: tinfo_t, sta_prop: int, x: size_t)-
set_tinfo_property(tif, sta_prop, x) -> size_t
@param tif: tinfo_t * @param sta_prop: int @param x: size_t
def set_tinfo_property4(tif: tinfo_t, sta_prop: int, p1: size_t, p2: size_t, p3: size_t, p4: size_t)-
set_tinfo_property4(tif, sta_prop, p1, p2, p3, p4) -> size_t
@param tif: tinfo_t * @param sta_prop: int @param p1: size_t @param p2: size_t @param p3: size_t @param p4: size_t
def set_type_alias(ti: til_t, src_ordinal: uint32, dst_ordinal: uint32)-
set_type_alias(ti, src_ordinal, dst_ordinal) -> bool Create a type alias. Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype.
@param ti: (C++: til_t *) @param src_ordinal: (C++: uint32) @param dst_ordinal: (C++: uint32)
def set_type_choosable(ti: til_t, ordinal: uint32, value: bool)-
set_type_choosable(ti, ordinal, value) Enable/disable 'choosability' flag for a struct/union type
@param ti: (C++: til_t *) type library @param ordinal: (C++: uint32) ordinal number of a UDT type @param value: (C++: bool) flag value
def set_vftable_ea(ordinal: uint32, vftable_ea: ea_t)-
set_vftable_ea(ordinal, vftable_ea) -> bool Set the address of a vftable instance for a vftable type.
@param ordinal: (C++: uint32) ordinal number of the corresponding vftable type. @param vftable_ea: (C++: ea_t) address of a virtual function table. @return: success
def store_til(ti: til_t, tildir: char const *, name: char const *)-
store_til(ti, tildir, name) -> bool Store til to a file. If the til contains garbage, it will be collected before storing the til. Your plugin should call compact_til() before calling store_til().
@param ti: (C++: til_t ) type library to store @param tildir: (C++: const char ) directory where to store the til. nullptr means current directory. @param name: (C++: const char *) filename of the til. If it's an absolute path, tildir is ignored. * NB: the file extension is forced to .til @return: success
def stroff_as_size(plen: int, tif: tinfo_t, value: asize_t)-
stroff_as_size(plen, tif, value) -> bool Should display a structure offset expression as the structure size?
@param plen: (C++: int) @param tif: (C++: const tinfo_t &) tinfo_t const & @param value: (C++: asize_t)
def switch_to_golang()-
switch_to_golang() switch to GOLANG calling convention (to be used as default CC)
def tinfo_errstr(code: tinfo_code_t)-
tinfo_errstr(code) -> char const * Helper function to convert an error code into a printable string. Additional arguments are handled using the functions from err.h
@param code: (C++: tinfo_code_t) enum tinfo_code_t
def udm_t__make_gap(_this: udm_t, byteoff: uval_t, nbytes: uval_t)-
udm_t__make_gap(_this, byteoff, nbytes) -> bool
@param _this: udm_t * @param byteoff: uval_t @param nbytes: uval_t
def udt_type_data_t__find_member(_this: udt_type_data_t, udm: udm_t, strmem_flags: int)-
udt_type_data_t__find_member(_this, udm, strmem_flags) -> ssize_t
@param _this: udt_type_data_t const * @param udm: udm_t * @param strmem_flags: int
def udt_type_data_t__get_best_fit_member(_this: udt_type_data_t, disp: asize_t)-
udt_type_data_t__get_best_fit_member(_this, disp) -> ssize_t
@param _this: udt_type_data_t const * @param disp: asize_t
def unpack_idcobj_from_bv(obj: idc_value_t *, tif: tinfo_t, bytes: bytevec_t const &, pio_flags: int = 0)-
unpack_idcobj_from_bv(obj, tif, bytes, pio_flags=0) -> error_t Read a typed idc object from the byte vector.
@param obj: (C++: idc_value_t *) @param tif: (C++: const tinfo_t &) tinfo_t const & @param bytes: (C++: const bytevec_t &) bytevec_t const & @param pio_flags: (C++: int)
def unpack_idcobj_from_idb(obj: idc_value_t *, tif: tinfo_t, ea: ea_t, off0: bytevec_t const *, pio_flags: int = 0)-
unpack_idcobj_from_idb(obj, tif, ea, off0, pio_flags=0) -> error_t Collection of register objects.
Read a typed idc object from the database
@param obj: (C++: idc_value_t ) @param tif: (C++: const tinfo_t &) tinfo_t const & @param ea: (C++: ea_t) @param off0: (C++: const bytevec_t ) bytevec_t const * @param pio_flags: (C++: int)
def unpack_object_from_bv(ti: til_t, type: type_t const *, fields: p_list const *, bytes: bytevec_t const &, pio_flags: int = 0)-
unpack_object_from_bv(ti, type, fields, bytes, pio_flags=0) -> PyObject Unpacks a buffer into an object. Returns the error_t returned by idaapi.pack_object_to_idb
@param ti: Type info. 'None' can be passed. @param type: type_t const * @param fields: fields string (may be empty or None) @param bytes: the bytes to unpack @param pio_flags: flags used while unpacking @return: - tuple(0, err) on failure - tuple(1, obj) on success
def unpack_object_from_idb(ti: til_t, type: type_t const *, fields: p_list const *, ea: ea_t, pio_flags: int = 0)-
unpack_object_from_idb(ti, type, fields, ea, pio_flags=0) -> PyObject
@param ti: til_t * @param type: type_t const * @param fields: p_list const * @param ea: ea_t @param pio_flags: int
def use_golang_cc() ‑> bool-
use_golang_cc() -> bool is GOLANG calling convention used by default?
def value_repr_t__from_opinfo(_this: value_repr_t, flags: flags64_t, afl: aflags_t, opinfo: opinfo_t, ap: array_parameters_t)-
value_repr_t__from_opinfo(_this, flags, afl, opinfo, ap) -> bool
@param _this: value_repr_t * @param flags: flags64_t @param afl: aflags_t @param opinfo: opinfo_t const * @param ap: array_parameters_t const *
def value_repr_t__print_(_this: value_repr_t, colored: bool)-
value_repr_t__print_(_this, colored) -> str
@param _this: value_repr_t const * @param colored: bool
def verify_argloc(vloc: argloc_t, size: int, gaps: rangeset_t)-
verify_argloc(vloc, size, gaps) -> int Verify argloc_t.
@param vloc: (C++: const argloc_t &) argloc to verify @param size: (C++: int) total size of the variable @param gaps: (C++: const rangeset_t *) if not nullptr, specifies gaps in structure definition. these gaps should not map to any argloc, but everything else must be covered @return: 0 if ok, otherwise an interr code.
def verify_tinfo(typid: typid_t)-
verify_tinfo(typid) -> int
@param typid: typid_t
def visit_stroff_udms(sfv: udm_visitor_t, path: tid_t const *, disp: adiff_t *, appzero: bool)-
visit_stroff_udms(sfv, path, disp, appzero) -> int Visit structure fields in a stroff expression or in a reference to a struct data variable. This function can be used to enumerate all components of an expression like 'a.b.c'.
@param sfv: (C++: udm_visitor_t &) visitor object @param path: (C++: const tid_t ) struct path (path[0] contains the initial struct id) @param disp: (C++: adiff_t ) offset into structure @param appzero: (C++: bool) should visit field at offset zero? @return: visitor result
def visit_subtypes(visitor: tinfo_visitor_t, out: type_mods_t, tif: tinfo_t, name: char const *, cmt: char const *)-
visit_subtypes(visitor, out, tif, name, cmt) -> int
@param visitor: tinfo_visitor_t * @param out: type_mods_t * @param tif: tinfo_t const & @param name: char const * @param cmt: char const *
def write_tinfo_bitfield_value(typid: typid_t, dst: uint64, v: uint64, bitoff: int)-
write_tinfo_bitfield_value(typid, dst, v, bitoff) -> uint64
@param typid: typid_t @param dst: uint64 @param v: uint64 @param bitoff: int
Classes
class aloc_visitor_t-
Proxy of C++ aloc_visitor_t class.
init(self) -> aloc_visitor_t
@param self: PyObject *
Instance variables
var thisown-
The membership flag
Methods
def visit_location(self, v: argloc_t, off: int, size: int) ‑> int-
visit_location(self, v, off, size) -> int
@param v: argloc_t & @param off: int @param size: int
class argloc_t (*args)-
Proxy of C++ argloc_t class.
init(self) -> argloc_t init(self, r) -> argloc_t
@param r: argloc_t const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def advance(self, delta: int) ‑> bool-
advance(self, delta) -> bool Move the location to point 'delta' bytes further.
@param delta: (C++: int)
def align_reg_high(self, size: size_t, _slotsize: size_t)-
align_reg_high(self, size, _slotsize) Set register offset to align it to the upper part of _SLOTSIZE.
@param size: (C++: size_t) @param _slotsize: (C++: size_t)
def align_stkoff_high(self, size: size_t, _slotsize: size_t)-
align_stkoff_high(self, size, _slotsize) Set stack offset to align to the upper part of _SLOTSIZE.
@param size: (C++: size_t) @param _slotsize: (C++: size_t)
def atype(self)-
atype(self) -> argloc_type_t Get type (Argument location types)
def calc_offset(self)-
calc_offset(self) -> sval_t Calculate offset that can be used to compare 2 similar arglocs.
def compare(self, r: argloc_t) ‑> int-
compare(self, r) -> int
@param r: argloc_t const &
def consume_rrel(self, p: rrel_t)-
consume_rrel(self, p) Set register-relative location - can't be nullptr.
@param p: (C++: rrel_t *)
def consume_scattered(self, p: scattered_aloc_t)-
consume_scattered(self, p) Set distributed argument location.
@param p: (C++: scattered_aloc_t *) scattered_aloc_t const &
def get_biggest(self)-
get_biggest(self) -> argloc_t::biggest_t Get largest element in internal union.
def get_custom(self)-
get_custom(self) -> void * Get custom argloc info. Use if atype() == ALOC_CUSTOM
def get_ea(self)-
get_ea(self) -> ea_t Get the global address. Use when atype() == ALOC_STATIC
def get_reginfo(self)-
get_reginfo(self) -> uint32 Get all register info. Use when atype() == ALOC_REG1 or ALOC_REG2
def get_rrel(self, *args)-
get_rrel(self) -> rrel_t Get register-relative info. Use when atype() == ALOC_RREL
def has_reg(self) ‑> bool-
has_reg(self) -> bool TRUE if argloc has a register part.
def has_stkoff(self) ‑> bool-
has_stkoff(self) -> bool TRUE if argloc has a stack part.
def in_stack(self) ‑> bool-
in_stack(self) -> bool TRUE if argloc is in stack entirely.
def is_badloc(self) ‑> bool-
is_badloc(self) -> bool See ALOC_NONE.
def is_custom(self) ‑> bool-
is_custom(self) -> bool See ALOC_CUSTOM.
def is_ea(self) ‑> bool-
is_ea(self) -> bool See ALOC_STATIC.
def is_fragmented(self) ‑> bool-
is_fragmented(self) -> bool is_scattered() || is_reg2()
def is_mixed_scattered(self) ‑> bool-
is_mixed_scattered(self) -> bool mixed scattered: consists of register and stack parts
def is_reg(self) ‑> bool-
is_reg(self) -> bool is_reg1() || is_reg2()
def is_reg1(self) ‑> bool-
is_reg1(self) -> bool See ALOC_REG1.
def is_reg2(self) ‑> bool-
is_reg2(self) -> bool See ALOC_REG2.
def is_rrel(self) ‑> bool-
is_rrel(self) -> bool See ALOC_RREL.
def is_scattered(self) ‑> bool-
is_scattered(self) -> bool See ALOC_DIST.
def is_stkoff(self) ‑> bool-
is_stkoff(self) -> bool See ALOC_STACK.
def reg1(self) ‑> int-
reg1(self) -> int Get the register info. Use when atype() == ALOC_REG1 or ALOC_REG2
def reg2(self) ‑> int-
reg2(self) -> int Get info for the second register. Use when atype() == ALOC_REG2
def regoff(self) ‑> int-
regoff(self) -> int Get offset from the beginning of the register in bytes. Use when atype() == ALOC_REG1
def scattered(self, *args)-
scattered(self) -> scattered_aloc_t Get scattered argument info. Use when atype() == ALOC_DIST
def set_badloc(self)-
set_badloc(self) Set to invalid location.
def set_ea(self, _ea: ea_t)-
set_ea(self, _ea) Set static ea location.
@param _ea: (C++: ea_t)
def set_reg1(self, reg: int, off: int = 0)-
set_reg1(self, reg, off=0) Set register location.
@param reg: (C++: int) @param off: (C++: int)
def set_reg2(self, _reg1: int, _reg2: int)-
set_reg2(self, _reg1, _reg2) Set secondary register location.
@param _reg1: (C++: int) @param _reg2: (C++: int)
def set_stkoff(self, off: sval_t)-
set_stkoff(self, off) Set stack offset location.
@param off: (C++: sval_t)
def stkoff(self)-
stkoff(self) -> sval_t Get the stack offset. Use if atype() == ALOC_STACK
def swap(self, r: argloc_t)-
swap(self, r) Assign this == r and r == this.
@param r: (C++: argloc_t &)
class argpart_t (*args)-
Proxy of C++ argpart_t class.
init(self, a) -> argpart_t
@param a: argloc_t const &
init(self) -> argpart_t
Ancestors
Instance variables
var off : ushort-
offset from the beginning of the argument
var size : ushort-
the number of bytes
Methods
def bad_offset(self) ‑> bool-
bad_offset(self) -> bool Does this argpart have a valid offset?
def bad_size(self) ‑> bool-
bad_size(self) -> bool Does this argpart have a valid size?
def swap(self, r: argpart_t)-
swap(self, r) Assign this = r and r = this.
@param r: (C++: argpart_t &)
Inherited members
argloc_t:advancealign_reg_highalign_stkoff_highatypecalc_offsetcompareconsume_rrelconsume_scatteredget_biggestget_customget_eaget_reginfoget_rrelhas_reghas_stkoffin_stackis_badlocis_customis_eais_fragmentedis_mixed_scatteredis_regis_reg1is_reg2is_rrelis_scatteredis_stkoffreg1reg2regoffscatteredset_badlocset_easet_reg1set_reg2set_stkoffstkoffthisown
class argpartvec_t (*args)-
Proxy of C++ qvector< argpart_t > class.
init(self) -> argpartvec_t init(self, x) -> argpartvec_t
@param x: qvector< argpart_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: argpart_t) ‑> bool-
add_unique(self, x) -> bool
@param x: argpart_t const &
def at(self, _idx: size_t)-
at(self, _idx) -> argpart_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> argpart_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> argpart_t
def erase(self, *args)-
erase(self, it) -> argpart_t
@param it: qvector< argpart_t >::iterator
erase(self, first, last) -> argpart_t
@param first: qvector< argpart_t >::iterator @param last: qvector< argpart_t >::iterator
def extract(self)-
extract(self) -> argpart_t
def find(self, *args)-
find(self, x) -> argpart_t
@param x: argpart_t const &
def front(self)def grow(self, *args)-
grow(self, x=argpart_t())
@param x: argpart_t const &
def has(self, x: argpart_t) ‑> bool-
has(self, x) -> bool
@param x: argpart_t const &
def inject(self, s: argpart_t, len: size_t)-
inject(self, s, len)
@param s: argpart_t * @param len: size_t
def insert(self, it: argpart_t, x: argpart_t)-
insert(self, it, x) -> argpart_t
@param it: qvector< argpart_t >::iterator @param x: argpart_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: argpart_t const &
push_back(self) -> argpart_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: argpart_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: argpartvec_t)-
swap(self, r)
@param r: qvector< argpart_t > &
def truncate(self)-
truncate(self)
class argtinfo_helper_t-
Proxy of C++ argtinfo_helper_t class.
init(self) -> argtinfo_helper_t
@param self: PyObject *
Instance variables
var reserved : size_t-
reserved
var thisown-
The membership flag
Methods
def has_delay_slot(self, arg0: ea_t)-
has_delay_slot(self, arg0) -> bool The call instruction with a delay slot?.
@param arg0: ea_t
def is_stkarg_load(self, insn: insn_t const &, src: int *, dst: int *)-
is_stkarg_load(self, insn, src, dst) -> bool Is the current insn a stkarg load?. if yes: * src: index of the source operand in insn_t::ops * dst: index of the destination operand in insn_t::ops insn_t::ops[dst].addr is expected to have the stack offset
@param insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &) @param src: (C++: int ) @param dst: (C++: int )
def set_op_tinfo(self, insn: insn_t const &, x: op_t const &, tif: tinfo_t, name: char const *)-
set_op_tinfo(self, insn, x, tif, name) -> bool Set the operand type as specified.
@param insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &) @param x: (C++: const op_t &) op_t const & @param tif: (C++: const tinfo_t &) tinfo_t const & @param name: (C++: const char *) char const *
def use_arg_tinfos(self, caller: ea_t, fti: func_type_data_t, rargs: funcargvec_t)-
use_arg_tinfos(self, caller, fti, rargs) This function is to be called by the processor module in response to ev_use_arg_types.
@param caller: (C++: ea_t) @param fti: (C++: func_type_data_t ) @param rargs: (C++: funcargvec_t )
class array_type_data_t (b: size_t = 0, n: size_t = 0)-
Proxy of C++ array_type_data_t class.
init(self, b=0, n=0) -> array_type_data_t
@param b: size_t @param n: size_t
Instance variables
var base : uint32-
array base
var elem_type : tinfo_t-
element type
var nelems : uint32-
number of elements
var thisown-
The membership flag
Methods
def swap(self, r: array_type_data_t)-
swap(self, r) set this = r and r = this
@param r: (C++: array_type_data_t &)
class bitfield_type_data_t-
Proxy of C++ bitfield_type_data_t class.
init(self, _nbytes=0, _width=0, _is_unsigned=False) -> bitfield_type_data_t
@param _nbytes: uchar @param _width: uchar @param _is_unsigned: bool
Instance variables
var is_unsigned : bool-
is bitfield unsigned?
var nbytes : uchar-
enclosing type size (1,2,4,8 bytes)
var thisown-
The membership flag
var width : uchar-
number of bits
Methods
def compare(self, r: bitfield_type_data_t) ‑> int-
compare(self, r) -> int
@param r: bitfield_type_data_t const &
def is_valid_bitfield(self) ‑> bool-
is_valid_bitfield(self) -> bool
def swap(self, r: bitfield_type_data_t)-
swap(self, r)
@param r: bitfield_type_data_t &
class callregs_t (*args)-
Proxy of C++ callregs_t class.
init(self) -> callregs_t init(self, cc) -> callregs_t
@param cc: cm_t
Class variables
var FPREGSvar GPREGS
Static methods
def regcount(cc: cm_t)-
regcount(cc) -> int Get max number of registers may be used in a function call.
@param cc: (C++: cm_t)
Instance variables
var fpregs : intvec_t-
array of fp registers
var gpregs : intvec_t-
array of gp registers
var nregs : int-
max number of registers that can be used in a call
var policy : argreg_policy_t-
argument policy
var thisown-
The membership flag
Methods
def by_slots(self) ‑> bool-
by_slots(self) -> bool
def init_regs(self, cc: cm_t)-
init_regs(self, cc) Init policy & registers for given CC.
@param cc: (C++: cm_t)
def reginds(self, gp_ind: int *, fp_ind: int *, r: int)-
reginds(self, gp_ind, fp_ind, r) -> bool Get register indexes within GP/FP arrays. (-1 -> is not present in the corresponding array)
@param gp_ind: (C++: int ) @param fp_ind: (C++: int ) @param r: (C++: int)
def reset(self)-
reset(self) Set policy and registers to invalid values.
def set(self, _policy: argreg_policy_t, gprs: int const *, fprs: int const *)-
set(self, _policy, gprs, fprs) Init policy & registers (arrays are -1-terminated)
@param _policy: (C++: argreg_policy_t) enum argreg_policy_t @param gprs: (C++: const int ) int const * @param fprs: (C++: const int ) int const *
def set_registers(self, kind: callregs_t::reg_kind_t, first_reg: int, last_reg: int)-
set_registers(self, kind, first_reg, last_reg)
@param kind: enum callregs_t::reg_kind_t @param first_reg: int @param last_reg: int
def swap(self, r: callregs_t)-
swap(self, r) swap two instances
@param r: (C++: callregs_t &)
class const_aloc_visitor_t-
Proxy of C++ const_aloc_visitor_t class.
init(self) -> const_aloc_visitor_t
@param self: PyObject *
Instance variables
var thisown-
The membership flag
Methods
def visit_location(self, v: argloc_t, off: int, size: int) ‑> int-
visit_location(self, v, off, size) -> int
@param v: argloc_t const & @param off: int @param size: int
class custom_data_type_info_t-
Proxy of C++ custom_data_type_info_t class.
init(self) -> custom_data_type_info_t
Instance variables
var dtid : int16-
data type id
var fid : int16-
data format ids
var thisown-
The membership flag
class edm_t-
Proxy of C++ edm_t class.
init(self) -> edm_t
Instance variables
var cmt : qstring-
cmt
var name : qstring-
name
var thisown-
The membership flag
var value : uint64-
value
Methods
def get_tid(self)-
get_tid(self) -> tid_t
def swap(self, r: edm_t)-
swap(self, r)
@param r: edm_t &
class enum_member_t-
Proxy of C++ edm_t class.
init(self) -> edm_t
Instance variables
var cmt : qstring-
cmt
var name : qstring-
name
var thisown-
The membership flag
var value : uint64-
value
Methods
def get_tid(self)-
get_tid(self) -> tid_t
def swap(self, r: edm_t)-
swap(self, r)
@param r: edm_t &
class edmvec_t (*args)-
Proxy of C++ qvector< edm_t > class.
init(self) -> edmvec_t init(self, x) -> edmvec_t
@param x: qvector< edm_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: edm_t) ‑> bool-
add_unique(self, x) -> bool
@param x: edm_t const &
def at(self, _idx: size_t)-
at(self, _idx) -> edm_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> edm_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> edm_t
def erase(self, *args)-
erase(self, it) -> edm_t
@param it: qvector< edm_t >::iterator
erase(self, first, last) -> edm_t
@param first: qvector< edm_t >::iterator @param last: qvector< edm_t >::iterator
def extract(self)-
extract(self) -> edm_t
def find(self, *args)-
find(self, x) -> edm_t
@param x: edm_t const &
def front(self)def grow(self, *args)-
grow(self, x=edm_t())
@param x: edm_t const &
def has(self, x: edm_t) ‑> bool-
has(self, x) -> bool
@param x: edm_t const &
def inject(self, s: edm_t, len: size_t)-
inject(self, s, len)
@param s: edm_t * @param len: size_t
def insert(self, it: edm_t, x: edm_t)-
insert(self, it, x) -> edm_t
@param it: qvector< edm_t >::iterator @param x: edm_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: edm_t const &
push_back(self) -> edm_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: edm_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: edmvec_t)-
swap(self, r)
@param r: qvector< edm_t > &
def truncate(self)-
truncate(self)
class enum_member_vec_t (*args)-
Proxy of C++ qvector< edm_t > class.
init(self) -> edmvec_t init(self, x) -> edmvec_t
@param x: qvector< edm_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: edm_t) ‑> bool-
add_unique(self, x) -> bool
@param x: edm_t const &
def at(self, _idx: size_t)-
at(self, _idx) -> edm_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> edm_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> edm_t
def erase(self, *args)-
erase(self, it) -> edm_t
@param it: qvector< edm_t >::iterator
erase(self, first, last) -> edm_t
@param first: qvector< edm_t >::iterator @param last: qvector< edm_t >::iterator
def extract(self)-
extract(self) -> edm_t
def find(self, *args)-
find(self, x) -> edm_t
@param x: edm_t const &
def front(self)def grow(self, *args)-
grow(self, x=edm_t())
@param x: edm_t const &
def has(self, x: edm_t) ‑> bool-
has(self, x) -> bool
@param x: edm_t const &
def inject(self, s: edm_t, len: size_t)-
inject(self, s, len)
@param s: edm_t * @param len: size_t
def insert(self, it: edm_t, x: edm_t)-
insert(self, it, x) -> edm_t
@param it: qvector< edm_t >::iterator @param x: edm_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: edm_t const &
push_back(self) -> edm_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: edm_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: edmvec_t)-
swap(self, r)
@param r: qvector< edm_t > &
def truncate(self)-
truncate(self)
class enum_type_data_t (*args)-
Proxy of C++ enum_type_data_t class.
init(self, _bte=BTE_ALWAYS|BTE_HEX) -> enum_type_data_t
@param _bte: bte_t
Ancestors
Instance variables
var bte : bte_t-
enum member sizes (shift amount) and style. do not manually set BTE_BITMASK, use set_enum_is_bitmask()
var group_sizes : intvec_t-
if present, specifies bitmask group sizes each non-trivial group starts with a mask member
var taenum_bits : uint32-
Type attributes for enums
Methods
def add_constant(self, name: char const *, value: uint64, cmt: char const * = None)-
add_constant(self, name, value, cmt=None) add constant for regular enum
@param name: (C++: const char ) char const * @param value: (C++: uint64) @param cmt: (C++: const char ) char const *
def all_constants(self)-
Generate tupples of all constants except of bitmasks. Each tupple is: [0] constant index [1] enum member index of group start [2] group size In case of regular enum the second element of tupple is 0 and the third element of tupple is the number of enum members.
def all_groups(self, skip_trivial=False)-
Generate tuples for bitmask enum groups. Each tupple is: [0] enum member index of group start [1] group size Tupples may include or not the group with 1 element.
def calc_mask(self)-
calc_mask(self) -> uint64
def calc_nbytes(self) ‑> int-
calc_nbytes(self) -> int get the width of enum in bytes
def find_member(self, *args)-
find_member(self, name, _from=0, to=size_t(-1)) -> ssize_t find member (constant or bmask) by value
@param name: char const * @param from: (C++: size_t) @param to: (C++: size_t)
find_member(self, value, serial, _from=0, to=size_t(-1), vmask=uint64(-1)) -> ssize_t
@param value: uint64 @param serial: uchar @param from: size_t @param to: size_t @param vmask: uint64
def get_constant_group(self, *args)-
get_constant_group(self, group_start_index, group_size, idx) -> bool get group parameters for the constant, valid for bitmask enum
@param group_start_index: (C++: size_t ) index of the group mask @param group_size: (C++: size_t ) group size (>=1) @param idx: (C++: size_t) constant index @return: success get_constant_group(self, idx) -> PyObject *
@param idx: size_t
def get_enum_radix(self) ‑> int-
get_enum_radix(self) -> int Get enum constant radix
@return: radix or 1 for BTE_CHAR
def get_max_serial(self, value: uint64)-
get_max_serial(self, value) -> uchar return the maximum serial for the value
@param value: (C++: uint64)
def get_serial(self, index: size_t)-
get_serial(self, index) -> uchar returns serial for the constant
@param index: (C++: size_t)
def get_value_repr(self, repr: value_repr_t)-
get_value_repr(self, repr) -> tinfo_code_t get enum radix and other representation info
@param repr: (C++: value_repr_t *) value display info
def has_lzero(self) ‑> bool-
has_lzero(self) -> bool
def is_bf(self) ‑> bool-
is_bf(self) -> bool is bitmask or ordinary enum?
def is_bin(self) ‑> bool-
is_bin(self) -> bool
def is_char(self) ‑> bool-
is_char(self) -> bool
def is_dec(self) ‑> bool-
is_dec(self) -> bool
def is_group_mask_at(self, idx: size_t)-
is_group_mask_at(self, idx) -> bool is the enum member at IDX a non-trivial group mask? a trivial group consist of one bit and has just one member, which can be considered as a mask or a bitfield constant
@param idx: (C++: size_t) index @return: success
def is_hex(self) ‑> bool-
is_hex(self) -> bool
def is_number_signed(self) ‑> bool-
is_number_signed(self) -> bool
def is_oct(self) ‑> bool-
is_oct(self) -> bool
def is_sbin(self) ‑> bool-
is_sbin(self) -> bool
def is_shex(self) ‑> bool-
is_shex(self) -> bool
def is_soct(self) ‑> bool-
is_soct(self) -> bool
def is_udec(self) ‑> bool-
is_udec(self) -> bool
def is_valid_group_sizes(self) ‑> bool-
is_valid_group_sizes(self) -> bool is valid group sizes
def set_enum_radix(self, radix: int, sign: bool)-
set_enum_radix(self, radix, sign) Set radix to display constants
@param radix: (C++: int) radix with the special case 1 to display as character @param sign: (C++: bool)
def set_lzero(self, on: bool)-
set_lzero(self, on)
@param on: bool
def set_nbytes(self, nbytes: int) ‑> bool-
set_nbytes(self, nbytes) -> bool set enum width (nbytes)
@param nbytes: (C++: int)
def set_value_repr(self, repr: value_repr_t)-
set_value_repr(self, repr) -> tinfo_code_t set enum radix and other representation info
@param repr: (C++: const value_repr_t &) value display info
def store_64bit_values(self) ‑> bool-
store_64bit_values(self) -> bool
def swap(self, r: enum_type_data_t)-
swap(self, r) swap two instances
@param r: (C++: enum_type_data_t &)
Inherited members
class func_type_data_t-
Proxy of C++ func_type_data_t class.
init(self) -> func_type_data_t
Ancestors
Instance variables
var cc : cm_t-
calling convention
var flags : int-
Function type data property bits
var retloc : argloc_t-
return location
var rettype : tinfo_t-
return type
var spoiled : reginfovec_t-
spoiled register information. if spoiled register info is present, it overrides the standard spoil info (eax, edx, ecx for x86)
var stkargs : uval_t-
size of stack arguments (not used in build_func_type)
Methods
def dump(self, praloc_bits: int = 2) ‑> bool-
dump(self, praloc_bits=0x02) -> bool Dump information that is not always visible in the function prototype. (argument locations, return location, total stkarg size)
@param praloc_bits: (C++: int)
def find_argument(self, *args)-
find_argument(self, name, _from=0, to=size_t(-1)) -> ssize_t find argument by name
@param name: (C++: const char *) char const * @param from: (C++: size_t) @param to: (C++: size_t)
def get_call_method(self) ‑> int-
get_call_method(self) -> int
def guess_cc(self, purged: int, cc_flags: int)-
guess_cc(self, purged, cc_flags) -> cm_t Guess function calling convention use the following info: argument locations and 'stkargs'
@param purged: (C++: int) @param cc_flags: (C++: int)
def is_const(self) ‑> bool-
is_const(self) -> bool
def is_ctor(self) ‑> bool-
is_ctor(self) -> bool
def is_dtor(self) ‑> bool-
is_dtor(self) -> bool
def is_golang_cc(self) ‑> bool-
is_golang_cc(self) -> bool
def is_high(self) ‑> bool-
is_high(self) -> bool
def is_noret(self) ‑> bool-
is_noret(self) -> bool
def is_pure(self) ‑> bool-
is_pure(self) -> bool
def is_static(self) ‑> bool-
is_static(self) -> bool
def is_swift_cc(self) ‑> bool-
is_swift_cc(self) -> bool
def is_vararg_cc(self) ‑> bool-
is_vararg_cc(self) -> bool
def is_virtual(self) ‑> bool-
is_virtual(self) -> bool
def swap(self, r: func_type_data_t)-
swap(self, r)
@param r: func_type_data_t &
Inherited members
class funcarg_t-
Proxy of C++ funcarg_t class.
init(self) -> funcarg_t
Instance variables
var argloc : argloc_t-
argument location
var cmt : qstring-
argument comment (may be empty)
var flags : uint32-
Function argument property bits
var name : qstring-
argument name (may be empty)
var thisown-
The membership flag
var type : tinfo_t-
argument type
class funcargvec_t (*args)-
Proxy of C++ qvector< funcarg_t > class.
init(self) -> funcargvec_t init(self, x) -> funcargvec_t
@param x: qvector< funcarg_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: funcarg_t) ‑> bool-
add_unique(self, x) -> bool
@param x: funcarg_t const &
def at(self, _idx: size_t)-
at(self, _idx) -> funcarg_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> funcarg_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> funcarg_t
def erase(self, *args)-
erase(self, it) -> funcarg_t
@param it: qvector< funcarg_t >::iterator
erase(self, first, last) -> funcarg_t
@param first: qvector< funcarg_t >::iterator @param last: qvector< funcarg_t >::iterator
def extract(self)-
extract(self) -> funcarg_t
def find(self, *args)-
find(self, x) -> funcarg_t
@param x: funcarg_t const &
def front(self)def grow(self, *args)-
grow(self, x=funcarg_t())
@param x: funcarg_t const &
def has(self, x: funcarg_t) ‑> bool-
has(self, x) -> bool
@param x: funcarg_t const &
def inject(self, s: funcarg_t, len: size_t)-
inject(self, s, len)
@param s: funcarg_t * @param len: size_t
def insert(self, it: funcarg_t, x: funcarg_t)-
insert(self, it, x) -> funcarg_t
@param it: qvector< funcarg_t >::iterator @param x: funcarg_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: funcarg_t const &
push_back(self) -> funcarg_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: funcarg_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: funcargvec_t)-
swap(self, r)
@param r: qvector< funcarg_t > &
def truncate(self)-
truncate(self)
class ida_lowertype_helper_t (_tif: tinfo_t, _ea: ea_t, _pb: int)-
Proxy of C++ ida_lowertype_helper_t class.
init(self, _tif, _ea, _pb) -> ida_lowertype_helper_t
@param _tif: tinfo_t const & @param _ea: ea_t @param _pb: int
Ancestors
Methods
def get_func_purged_bytes(self, candidate: tinfo_t, arg3: func_type_data_t) ‑> int-
get_func_purged_bytes(self, candidate, arg3) -> int
@param candidate: tinfo_t const & @param arg3: func_type_data_t const &
Inherited members
class lowertype_helper_t (*args, **kwargs)-
Proxy of C++ lowertype_helper_t class.
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def func_has_stkframe_hole(self, candidate: tinfo_t, candidate_data: func_type_data_t) ‑> bool-
func_has_stkframe_hole(self, candidate, candidate_data) -> bool
@param candidate: tinfo_t const & @param candidate_data: func_type_data_t const &
def get_func_purged_bytes(self, candidate: tinfo_t, candidate_data: func_type_data_t) ‑> int-
get_func_purged_bytes(self, candidate, candidate_data) -> int
@param candidate: tinfo_t const & @param candidate_data: func_type_data_t const &
class predicate_t-
Proxy of C++ predicate_t class.
init(self) -> predicate_t
@param self: PyObject *
Instance variables
var thisown-
The membership flag
Methods
def should_display(self, til: til_t, name: char const *, type: type_t const *, fields: p_list const *)-
should_display(self, til, name, type, fields) -> bool
@param til: til_t const * @param name: char const * @param type: type_t const * @param fields: p_list const *
class ptr_type_data_t (*args)-
Proxy of C++ ptr_type_data_t class.
init(self, c=tinfo_t(), bps=0, p=tinfo_t(), d=0) -> ptr_type_data_t
@param c: tinfo_t @param bps: uchar @param p: tinfo_t @param d: int32
Instance variables
var based_ptr_size : uchar-
based_ptr_size
var closure : tinfo_t-
cannot have both closure and based_ptr_size
var delta : int32-
Offset from the beginning of the parent struct.
var obj_type : tinfo_t-
pointed object type
var parent : tinfo_t-
Parent struct.
var taptr_bits : uchar-
TAH bits.
var thisown-
The membership flag
Methods
def is_code_ptr(self) ‑> bool-
is_code_ptr(self) -> bool Are we pointing to code?
def is_shifted(self) ‑> bool-
is_shifted(self) -> bool
def swap(self, r: ptr_type_data_t)-
swap(self, r) Set this = r and r = this.
@param r: (C++: ptr_type_data_t &)
class reginfovec_t (*args)-
Proxy of C++ qvector< reg_info_t > class.
init(self) -> reginfovec_t init(self, x) -> reginfovec_t
@param x: qvector< reg_info_t > const &
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: reg_info_t)-
add_unique(self, x) -> bool
@param x: reg_info_t const &
def append(self, *args)-
push_back(self, x)
@param x: reg_info_t const &
push_back(self) -> reg_info_t
def at(self, i: size_t)-
getitem(self, i) -> reg_info_t
@param i: size_t
def back(self)def begin(self, *args)-
begin(self) -> reg_info_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> reg_info_t
def erase(self, *args)-
erase(self, it) -> reg_info_t
@param it: qvector< reg_info_t >::iterator
erase(self, first, last) -> reg_info_t
@param first: qvector< reg_info_t >::iterator @param last: qvector< reg_info_t >::iterator
def extract(self)-
extract(self) -> reg_info_t
def find(self, *args)-
find(self, x) -> reg_info_t
@param x: reg_info_t const &
def front(self)def grow(self, *args)-
grow(self, x=reg_info_t())
@param x: reg_info_t const &
def has(self, x: reg_info_t)-
has(self, x) -> bool
@param x: reg_info_t const &
def inject(self, s: reg_info_t, len: size_t)-
inject(self, s, len)
@param s: reg_info_t * @param len: size_t
def insert(self, it: reg_info_t, x: reg_info_t)-
insert(self, it, x) -> reg_info_t
@param it: qvector< reg_info_t >::iterator @param x: reg_info_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: reg_info_t const &
push_back(self) -> reg_info_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: reg_info_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: reginfovec_t)-
swap(self, r)
@param r: qvector< reg_info_t > &
def truncate(self)-
truncate(self)
class regobj_t-
Proxy of C++ regobj_t class.
init(self) -> regobj_t
Instance variables
var regidx : int-
index into dbg->registers
var relocate : int-
0-plain num, 1-must relocate
var thisown-
The membership flag
var value : bytevec_t-
value
Methods
def size(self)-
size(self) -> size_t
class regobjs_t-
Proxy of C++ regobjs_t class.
init(self) -> regobjs_t
Ancestors
Inherited members
class regobjvec_t (*args)-
Proxy of C++ qvector< regobj_t > class.
init(self) -> regobjvec_t init(self, x) -> regobjvec_t
@param x: qvector< regobj_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def at(self, _idx: size_t)-
at(self, _idx) -> regobj_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> regobj_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> regobj_t
def erase(self, *args)-
erase(self, it) -> regobj_t
@param it: qvector< regobj_t >::iterator
erase(self, first, last) -> regobj_t
@param first: qvector< regobj_t >::iterator @param last: qvector< regobj_t >::iterator
def extract(self)-
extract(self) -> regobj_t
def front(self)def grow(self, *args)-
grow(self, x=regobj_t())
@param x: regobj_t const &
def inject(self, s: regobj_t, len: size_t)-
inject(self, s, len)
@param s: regobj_t * @param len: size_t
def insert(self, it: regobj_t, x: regobj_t)-
insert(self, it, x) -> regobj_t
@param it: qvector< regobj_t >::iterator @param x: regobj_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: regobj_t const &
push_back(self) -> regobj_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: regobj_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: regobjvec_t)-
swap(self, r)
@param r: qvector< regobj_t > &
def truncate(self)-
truncate(self)
class rrel_t-
Proxy of C++ rrel_t class.
init(self) -> rrel_t
Instance variables
var off : sval_t-
displacement from the address pointed by the register
var reg : int-
register index (into ph.reg_names)
var thisown-
The membership flag
class scattered_aloc_t-
Proxy of C++ scattered_aloc_t class.
init(self) -> scattered_aloc_t
Ancestors
Inherited members
class simd_info_t (*args)-
Proxy of C++ simd_info_t class.
init(self, nm=None, sz=0, memt=BTF_UNK) -> simd_info_t
@param nm: char const * @param sz: uint16 @param memt: type_t
Instance variables
var memtype : type_t-
member type BTF_INT8/16/32/64/128, BTF_UINT8/16/32/64/128 BTF_INT - integrals of any size/sign BTF_FLOAT, BTF_DOUBLE BTF_TBYTE - floatings of any size BTF_UNION - union of integral and floating types BTF_UNK - undefined
var name : char const *-
name of SIMD type (nullptr-undefined)
var size : uint16-
SIMD type size in bytes (0-undefined)
var thisown-
The membership flag
var tif : tinfo_t-
SIMD type (empty-undefined)
Methods
def match_pattern(self, pattern: simd_info_t) ‑> bool-
match_pattern(self, pattern) -> bool
@param pattern: simd_info_t const *
class stkarg_area_info_t-
Proxy of C++ stkarg_area_info_t class.
init(self) -> stkarg_area_info_t
Instance variables
var cb : size_t-
cb
var linkage_area : sval_t-
Size of the linkage area. explanations at: \link{https://www.ibm.com/docs/en/xl- fortran-aix/16.1.0?topic=conventions-linkage-area} examples: pc: 0, hppa: 0, ppc aix: 0x18 (equal to stkarg_offset)
var shadow_size : sval_t-
Size of the shadow area. explanations at: \link{https://stackoverflow.com/questions/30190132/what-is-the-shadow-space- in-x64-assembly} examples: x64 Visual Studio C++: 0x20, x64 gcc: 0, ppc aix: 0x20
var stkarg_offset : sval_t-
Offset from the SP to the first stack argument (can include linkage area) examples: pc: 0, hppa: -0x34, ppc aix: 0x18
var thisown-
The membership flag
class text_sink_t-
Proxy of C++ text_sink_t class.
init(self) -> text_sink_t
@param self: PyObject *
Instance variables
var thisown-
The membership flag
class til_symbol_t (n: char const * = None, t: til_t = None)-
Proxy of C++ til_symbol_t class.
init(self, n=None, t=None) -> til_symbol_t
@param n: char const * @param t: til_t const *
Instance variables
var name : char const *-
symbol name
var thisown-
The membership flag
var til : til_t const *-
pointer to til
class til_t-
Proxy of C++ til_t class.
init(self) -> til_t
Instance variables
var cc : compiler_info_t-
information about the target compiler
var desc : char *-
human readable til description
var flags : uint32-
Type info library property bits
var name : char *-
short file name (without path and extension)
var nbases : int-
number of base tils
var nrefs : int-
number of references to the til
var nstreams : int-
number of extra streams
var streams : til_stream_t **-
symbol stream storage
var thisown-
The membership flag
var type_names
Methods
def base(self, n: int)-
base(self, n) -> til_t tils that our til is based on
@param n: int
def find_base(self, n: char const *)-
find_base(self, n) -> til_t Find the base til with the provided name
@param n: (C++: const char *) the base til name @return: the found til_t, or nullptr
def get_type_names(self)def is_dirty(self) ‑> bool-
is_dirty(self) -> bool Has the til been modified? (TIL_MOD)
def set_dirty(self)-
set_dirty(self) Mark the til as modified (TIL_MOD)
class til_type_ref_t-
Proxy of C++ til_type_ref_t class.
init(self) -> til_type_ref_t
Instance variables
var bf_bitoff : int-
bf_bitoff
var bucket_start : uint64-
bucket_start
var cb : size_t-
cb
var cursor : tif_cursor_t-
cursor
var edm : edm_t-
BTF_ENUM: the current enum member.
var fa : funcarg_t const *-
BT_FUNC: the current argument, nullptr - ellipsis.
var is_detached : bool-
is_detached
var is_forward : bool-
is_forward
var is_writable : bool-
is_writable
var kind : type_t-
kind
var last_udm_offset : uint64-
last_udm_offset
var memidx : ssize_t-
memidx
var nmembers : size_t-
nmembers
var offset : uint64-
offset
var ordinal : uint32-
ordinal
var thisown-
The membership flag
var tif : tinfo_t-
tif
var total_size : size_t-
total_size
var udm : udm_t-
BTF_STRUCT or BTF_UNION: the current member.
var unpadded_size : size_t-
unpadded_size
Methods
def clear(self)-
clear(self)
def is_enum(self) ‑> bool-
is_enum(self) -> bool
def is_func(self) ‑> bool-
is_func(self) -> bool
def is_struct(self) ‑> bool-
is_struct(self) -> bool
def is_typedef(self) ‑> bool-
is_typedef(self) -> bool
def is_udt(self) ‑> bool-
is_udt(self) -> bool
def is_union(self) ‑> bool-
is_union(self) -> bool
def on_member(self) ‑> bool-
on_member(self) -> bool
class tinfo_t (*args)-
Proxy of C++ tinfo_t class.
init(self) -> tinfo_t init(self, decl_type) -> tinfo_t
@param decl_type: type_t
init(self, r) -> tinfo_t
@param r: tinfo_t const &
Class variables
var ENUMBM_AUTO-
convert to bitmask if the outcome is nice and useful
var ENUMBM_OFF-
convert to ordinal enum
var ENUMBM_ON-
convert to bitmask enum
Static methods
def get_stock(id: stock_type_id_t)-
get_stock(id) -> tinfo_t Get stock type information. This function can be used to get tinfo_t for some common types. The same tinfo_t will be returned for the same id, thus saving memory and increasing the speed Please note that retrieving the STI_SIZE_T or STI_SSIZE_T stock type, will also have the side-effect of adding that type to the 'idati' TIL, under the well-known name 'size_t' or 'ssize_t' (respectively). The same is valid for STI_COMPLEX64 and STI_COMPLEX64 stock types with names 'complex64_t' and 'complex128_t' (respectively).
@param id: (C++: stock_type_id_t) enum stock_type_id_t
Instance variables
var thisown-
The membership flag
Methods
def add_edm(self, *args)-
add_edm(self, edm, bmask=bmask64_t(-1), etf_flags=0, idx=-1) -> tinfo_code_t Add a new enum member (a new symbolic constant)
@param edm: (C++: const edm_t &) the constant name, value, and comment @param bmask: (C++: bmask64_t) bmask of the group to add the constant to @note: 1. For non-bitmask enum push back constant, BMASK is not used (set it ot -1), never failed 2. For bitmask enum: * if VAL and BMASK are not agreed, return TERR_BAD_MSKVAL * if group with BMASK exists, push back constant to group * otherwise use constant as bitmask for a new group @note: ETF_NO_SAVE is ignored
def add_funcarg(self, farg: funcarg_t, etf_flags: uint = 0, idx: ssize_t = -1)-
add_funcarg(self, farg, etf_flags=0, idx=-1) -> tinfo_code_t Add a function argument.
@param farg: (C++: const funcarg_t &) argument to add @param etf_flags: (C++: uint) type changing flags flags @param idx: (C++: ssize_t) the index in the funcarg array where the new funcarg should be placed. if the specified index cannot be honored because it would spoil the funcarg sorting order, it is silently ignored. @note: ETF_NO_SAVE is ignored
def add_udm(self, udm: udm_t, etf_flags: uint = 0, times: size_t = 1, idx: ssize_t = -1)-
add_udm(self, udm, etf_flags=0, times=1, idx=-1) -> tinfo_code_t Add a structure/union member.
@param udm: (C++: const udm_t &) member to add @param etf_flags: (C++: uint) type changing flags flags @param times: (C++: size_t) how many times to add. if times > 1, the member name will be appended a suffix like "_2" and so on @param idx: (C++: ssize_t) the index in the udm array where the new udm should be placed. if the specified index cannot be honored because it would spoil the udm sorting order, it is silently ignored. @note: ETF_NO_SAVE is ignored
def append_covered(self, out: rangeset_t, offset: uint64 = 0)-
append_covered(self, out, offset=0) -> bool Calculate set of covered bytes for the type
@param out: (C++: rangeset_t *) pointer to the output buffer. covered bytes will be appended to it. @param offset: (C++: uint64) delta in bytes to add to all calculations. used internally during recurion.
def calc_enum_mask(self)-
calc_enum_mask(self) -> uint64
def calc_gaps(self, out: rangeset_t)-
calc_gaps(self, out) -> bool Calculate set of padding bytes for the type
@param out: (C++: rangeset_t *) pointer to the output buffer; old buffer contents will be lost.
def calc_purged_bytes(self) ‑> int-
calc_purged_bytes(self) -> int
def calc_score(self)-
calc_score(self) -> uint32 Calculate the type score (the higher - the nicer is the type)
def calc_udt_aligns(self, sudt_flags: int = 4) ‑> bool-
calc_udt_aligns(self, sudt_flags=0x0004) -> bool Calculate the udt alignments using the field offsets/sizes and the total udt size This function does not work on typerefs
@param sudt_flags: (C++: int)
def change_sign(self, sign: type_sign_t)-
change_sign(self, sign) -> bool Change the type sign. Works only for the types that may have sign.
@param sign: (C++: type_sign_t)
def clear(self)-
clear(self) Clear contents of this tinfo, and remove from the type system.
def clr_const(self) ‑> bool-
clr_const(self) -> bool
def clr_const_volatile(self) ‑> bool-
clr_const_volatile(self) -> bool
def clr_decl_const_volatile(self)-
clr_decl_const_volatile(self)
def clr_volatile(self) ‑> bool-
clr_volatile(self) -> bool
def compare(self, r: tinfo_t) ‑> int-
compare(self, r) -> int
@param r: tinfo_t const &
def compare_with(self, r: tinfo_t, tcflags: int = 0) ‑> bool-
compare_with(self, r, tcflags=0) -> bool Compare two types, based on given flags (see tinfo_t comparison flags)
@param r: (C++: const tinfo_t &) tinfo_t const & @param tcflags: (C++: int)
def convert_array_to_ptr(self) ‑> bool-
convert_array_to_ptr(self) -> bool Convert an array into a pointer. type[] => type *
def copy(self) ‑> tinfo_t-
copy(self) -> tinfo_t
def copy_type(self, *args)-
copy_type(self, til, name, ntf_flags=0x0001|0x1000) -> tinfo_code_t
@param til: til_t * @param name: char const * @param ntf_flags: int
def create_array(self, *args) ‑> bool-
create_array(self, p, decl_type=BT_ARRAY) -> bool
@param p: array_type_data_t const & @param decl_type: type_t
create_array(self, tif, nelems=0, base=0, decl_type=BT_ARRAY) -> bool
@param tif: tinfo_t const & @param nelems: uint32 @param base: uint32 @param decl_type: type_t
def create_bitfield(self, *args) ‑> bool-
create_bitfield(self, p, decl_type=BT_BITFIELD) -> bool
@param p: bitfield_type_data_t const & @param decl_type: type_t
create_bitfield(self, nbytes, width, is_unsigned=False, decl_type=BT_BITFIELD) -> bool
@param nbytes: uchar @param width: uchar @param is_unsigned: bool @param decl_type: type_t
def create_enum(self, *args) ‑> bool-
create_enum(self, p, decl_type=BTF_ENUM) -> bool
@param p: enum_type_data_t & @param decl_type: type_t
def create_forward_decl(self, til: til_t, decl_type: type_t, name: char const *, ntf_flags: int = 0)-
create_forward_decl(self, til, decl_type, name, ntf_flags=0) -> tinfo_code_t Create a forward declaration. decl_type: BTF_STRUCT, BTF_UNION, or BTF_ENUM
@param til: (C++: til_t ) @param decl_type: (C++: type_t) @param name: (C++: const char ) char const * @param ntf_flags: (C++: int)
def create_func(self, *args) ‑> bool-
create_func(self, p, decl_type=BT_FUNC) -> bool
@param p: func_type_data_t & @param decl_type: type_t
def create_ptr(self, *args) ‑> bool-
create_ptr(self, p, decl_type=BT_PTR) -> bool
@param p: ptr_type_data_t const & @param decl_type: type_t
create_ptr(self, tif, bps=0, decl_type=BT_PTR) -> bool
@param tif: tinfo_t const & @param bps: uchar @param decl_type: type_t
def create_simple_type(self, decl_type: type_t)-
create_simple_type(self, decl_type) -> bool
@param decl_type: type_t
def create_typedef(self, *args)-
create_typedef(self, p, decl_type=BTF_TYPEDEF, try_ordinal=True) -> bool
@param p: typedef_type_data_t const & @param decl_type: type_t @param try_ordinal: bool
create_typedef(self, til, name, decl_type=BTF_TYPEDEF, try_ordinal=True)
@param til: til_t const * @param name: char const * @param decl_type: type_t @param try_ordinal: bool
create_typedef(self, til, ord, decl_type=BTF_TYPEDEF)
@param til: til_t const * @param ord: uint @param decl_type: type_t
def create_udt(self, *args) ‑> bool-
create_udt(self, p) -> bool
@param p: udt_type_data_t &
create_udt(self, p, decl_type) -> bool
@param p: udt_type_data_t & @param decl_type: type_t
def del_attr(self, key: qstring const &, make_copy: bool = True)-
del_attr(self, key, make_copy=True) -> bool Del a type attribute. typerefs cannot be modified by this function.
@param key: (C++: const qstring &) qstring const & @param make_copy: (C++: bool)
def del_attrs(self)-
del_attrs(self) Del all type attributes. typerefs cannot be modified by this function.
def del_edm(self, idx: size_t, etf_flags: uint = 0)-
del_edm(self, idx, etf_flags=0) -> tinfo_code_t
@param idx: size_t @param etf_flags: uint
def del_edms(self, idx1: size_t, idx2: size_t, etf_flags: uint = 0)-
del_edms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete enum members
@param idx1: (C++: size_t) index in edmvec_t @param idx2: (C++: size_t) index in edmvec_t or size_t(-1) @param etf_flags: (C++: uint) etf_flag_t Delete enum members in [idx1, idx2) @note: For bitmask enum, the first member of a non-trivial group (having 2 or more members) is considered as a group mask. It is impossible to delete the group mask of a non-trivial group, other members of the group must be deleted first. Empty groups are automatically deleted.
def del_funcarg(self, idx: size_t, etf_flags: uint = 0)-
del_funcarg(self, idx, etf_flags=0) -> tinfo_code_t
@param idx: size_t @param etf_flags: uint
def del_funcargs(self, idx1: size_t, idx2: size_t, etf_flags: uint = 0)-
del_funcargs(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete function arguments
@param idx1: (C++: size_t) index in funcargvec_t @param idx2: (C++: size_t) index in funcargvec_t or size_t(-1) @param etf_flags: (C++: uint) etf_flag_t Delete function arguments in [idx1, idx2)
def del_udm(self, index: size_t, etf_flags: uint = 0)-
del_udm(self, index, etf_flags=0) -> tinfo_code_t Delete a structure/union member.
@param index: (C++: size_t) @param etf_flags: (C++: uint)
def del_udms(self, idx1: size_t, idx2: size_t, etf_flags: uint = 0)-
del_udms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t Delete structure/union members in the range [idx1, idx2)
@param idx1: (C++: size_t) @param idx2: (C++: size_t) @param etf_flags: (C++: uint)
def deserialize(self, *args) ‑> bool-
deserialize(self, til, ptype, pfields=None, pfldcmts=None, cmt=None) -> bool Deserialize a type string into a tinfo_t object.
@param til: (C++: const til_t ) til_t const * @param ptype: (C++: const qtype ) type_t const ** @param pfields: (C++: const qtype ) p_list const ** @param pfldcmts: (C++: const qtype ) p_list const ** @param cmt: (C++: const char *) char const *
deserialize(self, til, type, fields, cmts=None) -> bool
@param til: til_t const * @param type: type_t const * @param fields: p_list const * @param cmts: p_list const *
def detach(self) ‑> bool-
detach(self) -> bool Detach tinfo_t from the underlying type. After calling this finction, tinfo_t will lose its link to the underlying named or numbered type (if any) and will become a reference to a unique type. After that, any modifications to tinfo_t will affect only its type.
def dstr(self)-
dstr(self) -> char const * Function to facilitate debugging.
def edit_edm(self, *args)-
edit_edm(self, idx, value, bmask=bmask64_t(-1), etf_flags=0) -> tinfo_code_t Change constant value and/or bitmask
@param idx: (C++: size_t) index in edmvec_t @param value: (C++: uint64) old or new value @param bmask: (C++: bmask64_t) old or new bitmask @note: if new bitmask is specified the index of constant may be changed
def empty(self) ‑> bool-
empty(self) -> bool Was tinfo_t initialized with some type info or not?
def equals_to(self, r: tinfo_t) ‑> bool-
equals_to(self, r) -> bool
@param r: tinfo_t const &
def expand_udt(self, idx: size_t, delta: adiff_t, etf_flags: uint = 0)-
expand_udt(self, idx, delta, etf_flags=0) -> tinfo_code_t Expand/shrink a structure by adding/removing a gap before the specified member.
@param idx: (C++: size_t) index of the member @param delta: (C++: adiff_t) number of bytes to add or remove @param etf_flags: (C++: uint) etf_flag_t Please note that it is impossible to add a gap at the very end of a structure. However, adding before a regular member is possible. This function can be used to remove gaps in the middle of a structure by specifying a negative delta value. @note: It is possible to add/remove a gap at the end of a fixed structure. Use IDX equal to the number of members for that.
def find_edm(self, *args)-
find_edm(self, edm, value, bmask=bmask64_t(-1), serial=0) -> ssize_t Find enum member
@param edm: (C++: edm_t *) enum type member, may be nullptr @param value: uint64 @param bmask: bmask64_t @return: member index, otherwise returns -1. find_edm(self, edm, name) -> ssize_t
@param edm: edm_t * @param name: char const *
def find_udm(self, *args) ‑> int-
find_udm(self, udm, strmem_flags) -> int BTF_STRUCT,BTF_UNION: Find an udt member by name
@param udm: udm_t * @param strmem_flags: (C++: int)
@return: the index of the found member or -1 find_udm(self, offset, strmem_flags=0) -> int
@param offset: uint64 @param strmem_flags: int
find_udm(self, name, strmem_flags=0) -> int
@param name: char const * @param strmem_flags: int
def find_udt_member(self, *args) ‑> int-
find_udm(self, udm, strmem_flags) -> int BTF_STRUCT,BTF_UNION: Find an udt member by name
@param udm: udm_t * @param strmem_flags: (C++: int)
@return: the index of the found member or -1 find_udm(self, offset, strmem_flags=0) -> int
@param offset: uint64 @param strmem_flags: int
find_udm(self, name, strmem_flags=0) -> int
@param name: char const * @param strmem_flags: int
def force_tid(self)-
force_tid(self) -> tid_t Get the type tid. Create if it does not exist yet. If the type comes from a base til, the type will be copied to the local til and a new tid will be created for it. (if the type comes from a base til, it does not have a tid yet). If the type comes from the local til, this function is equivalent to get_tid()
@return: tid or BADADDR
def get_alias_target(self)-
get_alias_target(self) -> uint32 Get type alias If the type has no alias, return 0.
def get_array_details(self, ai: array_type_data_t) ‑> bool-
get_array_details(self, ai) -> bool Get the array specific info.
@param ai: (C++: array_type_data_t *)
def get_array_element(self) ‑> tinfo_t-
get_array_element(self) -> tinfo_t
def get_array_nelems(self) ‑> int-
get_array_nelems(self) -> int
def get_attr(self, key: qstring const &, all_attrs: bool = True)-
get_attr(self, key, all_attrs=True) -> PyObject Get a type attribute.
@param key: (C++: const qstring &) qstring const & @param all_attrs: (C++: bool)
def get_attrs(self, tav: type_attrs_t, all_attrs: bool = False) ‑> bool-
get_attrs(self, tav, all_attrs=False) -> bool Get type attributes (all_attrs: include attributes of referenced types, if any)
@param tav: (C++: type_attrs_t *) @param all_attrs: (C++: bool)
def get_bit_buckets(self, buckets: range64vec_t)-
get_bit_buckets(self, buckets) -> bool ::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields
@param buckets: (C++: range64vec_t *) @return: false if wrong type was passed
def get_bitfield_details(self, bi: bitfield_type_data_t) ‑> bool-
get_bitfield_details(self, bi) -> bool Get the bitfield specific info.
@param bi: (C++: bitfield_type_data_t *)
def get_declalign(self)-
get_declalign(self) -> uchar Get declared alignment of the type.
def get_decltype(self)-
get_decltype(self) -> type_t Get declared type (without resolving type references; they are returned as is). Obviously this is a very fast function and should be used instead of get_realtype() if possible. Please note that for typerefs this function will return BTF_TYPEDEF. To determine if a typeref is a typedef, use is_typedef()
def get_edm(self, edm: edm_t, idx: size_t)-
get_edm(self, edm, idx) -> tinfo_code_t Get enum member
@param edm: (C++: edm_t *) enum type member @param idx: (C++: size_t) enum member index
def get_edm_by_name(self, mname: char const *, til: til_t = None)-
get_edm_by_name(self, mname, til=None) -> ssize_t Retrieve enum tinfo using enum member name
@param mname: (C++: const char ) enum type member name @param til: (C++: const til_t ) type library @return: member index, otherwise returns -1. If the function fails, THIS object becomes empty.
def get_edm_by_tid(self, edm: edm_t, tid: tid_t)-
get_edm_by_tid(self, edm, tid) -> ssize_t
@param edm: edm_t * @param tid: tid_t
def get_edm_tid(self, idx: size_t)-
get_edm_tid(self, idx) -> tid_t Get enum member TID
@param idx: (C++: size_t) enum member index @return: tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address.
def get_enum_base_type(self)-
get_enum_base_type(self) -> type_t Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert
def get_enum_details(self, ei: enum_type_data_t) ‑> bool-
get_enum_details(self, ei) -> bool Get the enum specific info.
@param ei: (C++: enum_type_data_t *)
def get_enum_nmembers(self)-
get_enum_nmembers(self) -> size_t Get number of enum members.
@return: BADSIZE if error
def get_enum_radix(self) ‑> int-
get_enum_radix(self) -> int Get enum constant radix
@return: radix or 1 for BTE_CHAR enum_type_data_t::get_enum_radix()
def get_enum_repr(self, repr: value_repr_t)-
get_enum_repr(self, repr) -> tinfo_code_t Set the representation of enum members.
@param repr: (C++: value_repr_t *) value_repr_t
def get_enum_width(self) ‑> int-
get_enum_width(self) -> int Get enum width
@return: width of enum base type in bytes, 0 - unspecified, or -1 enum_type_data_t::calc_nbytes()
def get_final_element(self) ‑> tinfo_t-
get_final_element(self) -> tinfo_t repeat recursively: if an array, return the type of its element; else return the type itself.
def get_final_ordinal(self)-
get_final_ordinal(self) -> uint32 Get final type ordinal (0 if none)
def get_final_type_name(self) ‑> bool-
get_final_type_name(self) -> bool Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3…TYPEn).
@return: the name of the last type in the chain (TYPEn). if there is no chain, returns TYPE1
def get_forward_type(self)-
get_forward_type(self) -> type_t Get type of a forward declaration. For a forward declaration this function returns its base type. In other cases it returns BT_UNK
def get_frame_func(self)-
get_frame_func(self) -> ea_t Get function address for the frame.
def get_func_details(self, fi: func_type_data_t, gtd: gtd_func_t = 0)-
get_func_details(self, fi, gtd=GTD_CALC_ARGLOCS) -> bool Get only the function specific info for this tinfo_t.
@param fi: (C++: func_type_data_t *) @param gtd: (C++: gtd_func_t) enum gtd_func_t
def get_func_frame(self, pfn: func_t const *)-
get_func_frame(self, pfn) -> bool Create a tinfo_t object for the function frame
@param pfn: (C++: const func_t *) function
def get_innermost_member_type(self, bitoffset: uint64)-
get_innermost_member_type(self, bitoffset) -> tinfo_t Get the innermost member type at the given offset
@param bitoffset: (C++: uint64) bit offset into the structure @retval the: innermost member type
def get_innermost_udm(self, bitoffset: uint64)-
get_innermost_udm(self, bitoffset) -> tinfo_t Get the innermost member at the given offset
@param bitoffset: (C++: uint64) bit offset into the structure @retval udt: with the innermost member @retval empty: type if it is not a struct type or OFFSET could not be found
def get_methods(self, methods: udtmembervec_t) ‑> bool-
get_methods(self, methods) -> bool
@param BT_COMPLEX: get a list of member functions declared in this udt. @return: false if no member functions exist
def get_modifiers(self)-
get_modifiers(self) -> type_t
def get_named_type(self, *args) ‑> bool-
get_named_type(self, til, name, decl_type=BTF_TYPEDEF, resolve=True, try_ordinal=True) -> bool
@param til: til_t const * @param name: char const * @param decl_type: type_t @param resolve: bool @param try_ordinal: bool
get_named_type(self, name, decl_type=BTF_TYPEDEF, resolve=True, try_ordinal=True) -> bool
@param name: char const * @param decl_type: type_t @param resolve: bool @param try_ordinal: bool
def get_nargs(self) ‑> int-
get_nargs(self) -> int BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error)
def get_next_type_name(self) ‑> bool-
get_next_type_name(self) -> bool Use In the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3…TYPEn).
@return: the name of the next type in the chain (TYPE2). if there is no chain, returns failure
def get_nice_type_name(self) ‑> bool-
get_nice_type_name(self) -> bool Get the beautified type name. Get the referenced name and apply regular expressions from goodname.cfg to beautify the name
def get_nth_arg(self, n: int) ‑> tinfo_t-
get_nth_arg(self, n) -> tinfo_t BT_FUNC or BT_PTR BT_FUNC: Get type of n-th arg (-1 means return type, see get_rettype())
@param n: (C++: int)
def get_numbered_type(self, *args) ‑> bool-
get_numbered_type(self, til, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool
@param til: til_t const * @param ordinal: uint32 @param decl_type: type_t @param resolve: bool
get_numbered_type(self, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool
@param ordinal: uint32 @param decl_type: type_t @param resolve: bool
def get_onemember_type(self) ‑> tinfo_t-
get_onemember_type(self) -> tinfo_t For objects consisting of one member entirely: return type of the member.
def get_ordinal(self)-
get_ordinal(self) -> uint32 Get type ordinal (only if the type was created as a numbered type, 0 if none)
def get_pointed_object(self) ‑> tinfo_t-
get_pointed_object(self) -> tinfo_t
def get_ptr_details(self, pi: ptr_type_data_t) ‑> bool-
get_ptr_details(self, pi) -> bool Get the pointer info.
@param pi: (C++: ptr_type_data_t *)
def get_ptrarr_object(self) ‑> tinfo_t-
get_ptrarr_object(self) -> tinfo_t BT_PTR & BT_ARRAY: get the pointed object or array element. If the current type is not a pointer or array, return empty type info.
def get_ptrarr_objsize(self) ‑> int-
get_ptrarr_objsize(self) -> int BT_PTR & BT_ARRAY: get size of pointed object or array element. On error returns -1
def get_realtype(self, full: bool = False)-
get_realtype(self, full=False) -> type_t Get the resolved base type. Deserialization options: * if full=true, the referenced type will be deserialized fully, this may not always be desirable (slows down things) * if full=false, we just return the base type, the referenced type will be resolved again later if necessary (this may lead to multiple resolvings of the same type) imho full=false is a better approach because it does not perform unnecessary actions just in case. however, in some cases the caller knows that it is very likely that full type info will be required. in those cases full=true makes sense
@param full: (C++: bool)
def get_rettype(self) ‑> tinfo_t-
get_rettype(self) -> tinfo_t BT_FUNC or BT_PTR BT_FUNC: Get the function's return type
def get_sign(self)-
get_sign(self) -> type_sign_t Get type sign.
def get_size(self, p_effalign: uint32 * = None, gts_code: int = 0)-
get_size(self, p_effalign=None, gts_code=0) -> size_t Get the type size in bytes.
@param p_effalign: (C++: uint32 *) buffer for the alignment value @param gts_code: (C++: int) combination of GTS_… constants @return: BADSIZE in case of problems
def get_stkvar(self, insn: insn_t const &, x: op_t const, v: sval_t)-
get_stkvar(self, insn, x, v) -> ssize_t Retrieve frame tinfo for a stack variable
@param insn: (C++: const insn_t &) the instruction @param x: (C++: const op_t *) reference to instruction operand, may be nullptr @param v: (C++: sval_t) immediate value in the operand (usually x.addr) @return: returns the member index, otherwise returns -1. if the function fails, THIS object becomes empty.
def get_tid(self)-
get_tid(self) -> tid_t Get the type tid Each type in the local type library has a so-called
tidassociated with it. The tid is used to collect xrefs to the type. The tid is created when the type is created in the local type library and does not change afterwards. It can be passed to xref-related functions instead of the address.@return: tid or BADADDR @note: types that do not come from a type library (that exist only in the memory) can not have a tid.
def get_til(self)-
get_til(self) -> til_t Get the type library for tinfo_t.
def get_type_by_tid(self, tid: tid_t)-
get_type_by_tid(self, tid) -> bool
@param tid: tid_t
def get_type_cmt(self) ‑> int-
get_type_cmt(self) -> int Get type comment
@return: 0-failed, 1-returned regular comment, 2-returned repeatable comment
def get_type_name(self) ‑> bool-
get_type_name(self) -> bool Does a type refer to a name?. If yes, fill the provided buffer with the type name and return true. Names are returned for numbered types too: either a user- defined nice name or, if a user-provided name does not exist, an ordinal name (like #xx, see create_numbered_type_name()).
def get_type_rptcmt(self) ‑> bool-
get_type_rptcmt(self) -> bool Get type comment only if it is repeatable.
def get_udm_by_tid(self, udm: udm_t, tid: tid_t)-
get_udm_by_tid(self, udm, tid) -> ssize_t Retrive tinfo using type TID or struct/enum member MID
@param udm: (C++: udm_t *) [out]: place to save the found member to, may be nullptr @param tid: (C++: tid_t) tid can denote a type tid or a member tid. @return: if a member tid was specified, returns the member index, otherwise returns -1. if the function fails, THIS object becomes empty.
def get_udm_tid(self, idx: size_t)-
get_udm_tid(self, idx) -> tid_t Get udt member TID
@param idx: (C++: size_t) the index of udt the member @return: tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address.
def get_udt_details(self, udt: udt_type_data_t, gtd: gtd_udt_t = 0)-
get_udt_details(self, udt, gtd=GTD_CALC_LAYOUT) -> bool Get the udt specific info.
@param udt: (C++: udt_type_data_t *) @param gtd: (C++: gtd_udt_t) enum gtd_udt_t
def get_udt_nmembers(self) ‑> int-
get_udt_nmembers(self) -> int Get number of udt members. -1-error.
def get_unpadded_size(self)-
get_unpadded_size(self) -> size_t Get the type size in bytes without the final padding, in bytes. For some UDTs get_unpadded_size() != get_size()
def has_details(self) ‑> bool-
has_details(self) -> bool Does this type refer to a nontrivial type?
def has_union(self) ‑> bool-
has_union(self) -> bool Has a member of type "union"?
def has_vftable(self) ‑> bool-
has_vftable(self) -> bool Has a vftable?
def is_aliased(self) ‑> bool-
is_aliased(self) -> bool
def is_anonymous_udt(self) ‑> bool-
is_anonymous_udt(self) -> bool Is an anonymous struct/union? We assume that types with names are anonymous if the name starts with $
def is_arithmetic(self) ‑> bool-
is_arithmetic(self) -> bool is_type_arithmetic(get_realtype())
def is_array(self) ‑> bool-
is_array(self) -> bool is_type_array(get_realtype())
def is_bitfield(self) ‑> bool-
is_bitfield(self) -> bool is_type_bitfld(get_realtype())
def is_bitmask_enum(self) ‑> bool-
is_bitmask_enum(self) -> bool Is bitmask enum?
@return: true for bitmask enum and false in other cases enum_type_data_t::is_bf()
def is_bool(self) ‑> bool-
is_bool(self) -> bool is_type_bool(get_realtype())
def is_castable_to(self, target: tinfo_t) ‑> bool-
is_castable_to(self, target) -> bool
@param target: tinfo_t const &
def is_char(self) ‑> bool-
is_char(self) -> bool is_type_char(get_realtype())
def is_complex(self) ‑> bool-
is_complex(self) -> bool is_type_complex(get_realtype())
def is_const(self) ‑> bool-
is_const(self) -> bool is_type_const(get_realtype())
def is_correct(self) ‑> bool-
is_correct(self) -> bool Is the type object correct?. It is possible to create incorrect types. For example, we can define a function that returns an enum and then delete the enum type. If this function returns false, the type should not be used in disassembly. Please note that this function does not verify all involved types: for example, pointers to undefined types are permitted.
def is_decl_array(self) ‑> bool-
is_decl_array(self) -> bool is_type_array(get_decltype())
def is_decl_bitfield(self) ‑> bool-
is_decl_bitfield(self) -> bool is_type_bitfld(get_decltype())
def is_decl_bool(self) ‑> bool-
is_decl_bool(self) -> bool is_type_bool(get_decltype())
def is_decl_char(self) ‑> bool-
is_decl_char(self) -> bool is_type_char(get_decltype())
def is_decl_complex(self) ‑> bool-
is_decl_complex(self) -> bool is_type_complex(get_decltype())
def is_decl_const(self) ‑> bool-
is_decl_const(self) -> bool is_type_const(get_decltype())
def is_decl_double(self) ‑> bool-
is_decl_double(self) -> bool is_type_double(get_decltype())
def is_decl_enum(self) ‑> bool-
is_decl_enum(self) -> bool is_type_enum(get_decltype())
def is_decl_float(self) ‑> bool-
is_decl_float(self) -> bool is_type_float(get_decltype())
def is_decl_floating(self) ‑> bool-
is_decl_floating(self) -> bool is_type_floating(get_decltype())
def is_decl_func(self) ‑> bool-
is_decl_func(self) -> bool is_type_func(get_decltype())
def is_decl_int(self) ‑> bool-
is_decl_int(self) -> bool is_type_int(get_decltype())
def is_decl_int128(self) ‑> bool-
is_decl_int128(self) -> bool is_type_int128(get_decltype())
def is_decl_int16(self) ‑> bool-
is_decl_int16(self) -> bool is_type_int16(get_decltype())
def is_decl_int32(self) ‑> bool-
is_decl_int32(self) -> bool is_type_int32(get_decltype())
def is_decl_int64(self) ‑> bool-
is_decl_int64(self) -> bool is_type_int64(get_decltype())
def is_decl_last(self) ‑> bool-
is_decl_last(self) -> bool is_typeid_last(get_decltype())
def is_decl_ldouble(self) ‑> bool-
is_decl_ldouble(self) -> bool is_type_ldouble(get_decltype())
def is_decl_paf(self) ‑> bool-
is_decl_paf(self) -> bool is_type_paf(get_decltype())
def is_decl_partial(self) ‑> bool-
is_decl_partial(self) -> bool is_type_partial(get_decltype())
def is_decl_ptr(self) ‑> bool-
is_decl_ptr(self) -> bool is_type_ptr(get_decltype())
def is_decl_struct(self) ‑> bool-
is_decl_struct(self) -> bool is_type_struct(get_decltype())
def is_decl_sue(self) ‑> bool-
is_decl_sue(self) -> bool is_type_sue(get_decltype())
def is_decl_tbyte(self) ‑> bool-
is_decl_tbyte(self) -> bool is_type_tbyte(get_decltype())
def is_decl_typedef(self) ‑> bool-
is_decl_typedef(self) -> bool is_type_typedef(get_decltype())
def is_decl_uchar(self) ‑> bool-
is_decl_uchar(self) -> bool is_type_uchar(get_decltype())
def is_decl_udt(self) ‑> bool-
is_decl_udt(self) -> bool is_type_struni(get_decltype())
def is_decl_uint(self) ‑> bool-
is_decl_uint(self) -> bool is_type_uint(get_decltype())
def is_decl_uint128(self) ‑> bool-
is_decl_uint128(self) -> bool is_type_uint128(get_decltype())
def is_decl_uint16(self) ‑> bool-
is_decl_uint16(self) -> bool is_type_uint16(get_decltype())
def is_decl_uint32(self) ‑> bool-
is_decl_uint32(self) -> bool is_type_uint32(get_decltype())
def is_decl_uint64(self) ‑> bool-
is_decl_uint64(self) -> bool is_type_uint64(get_decltype())
def is_decl_union(self) ‑> bool-
is_decl_union(self) -> bool is_type_union(get_decltype())
def is_decl_unknown(self) ‑> bool-
is_decl_unknown(self) -> bool is_type_unknown(get_decltype())
def is_decl_void(self) ‑> bool-
is_decl_void(self) -> bool is_type_void(get_decltype())
def is_decl_volatile(self) ‑> bool-
is_decl_volatile(self) -> bool is_type_volatile(get_decltype())
def is_double(self) ‑> bool-
is_double(self) -> bool is_type_double(get_realtype())
def is_empty_enum(self) ‑> bool-
is_empty_enum(self) -> bool Is an empty enum? (has no constants)
def is_empty_udt(self) ‑> bool-
is_empty_udt(self) -> bool Is an empty struct/union? (has no fields)
def is_enum(self) ‑> bool-
is_enum(self) -> bool is_type_enum(get_realtype())
def is_ext_arithmetic(self) ‑> bool-
is_ext_arithmetic(self) -> bool is_type_ext_arithmetic(get_realtype())
def is_ext_integral(self) ‑> bool-
is_ext_integral(self) -> bool is_type_ext_integral(get_realtype())
def is_fixed_struct(self) ‑> bool-
is_fixed_struct(self) -> bool Is a structure with fixed offsets?
def is_float(self) ‑> bool-
is_float(self) -> bool is_type_float(get_realtype())
def is_floating(self) ‑> bool-
is_floating(self) -> bool is_type_floating(get_realtype())
def is_forward_decl(self) ‑> bool-
is_forward_decl(self) -> bool Is this a forward declaration?. Forward declarations are placeholders: the type definition does not exist
def is_forward_enum(self) ‑> bool-
is_forward_enum(self) -> bool
def is_forward_struct(self) ‑> bool-
is_forward_struct(self) -> bool
def is_forward_union(self) ‑> bool-
is_forward_union(self) -> bool
def is_frame(self) ‑> bool-
is_frame(self) -> bool Is a function frame?
def is_from_subtil(self) ‑> bool-
is_from_subtil(self) -> bool Was the named type found in some base type library (not the top level type library)?. If yes, it usually means that the type comes from some loaded type library, not the local type library for the database
def is_func(self) ‑> bool-
is_func(self) -> bool is_type_func(get_realtype())
def is_funcptr(self) ‑> bool-
is_funcptr(self) -> bool Is this pointer to a function?
def is_high_func(self) ‑> bool-
is_high_func(self) -> bool
def is_int(self) ‑> bool-
is_int(self) -> bool is_type_int(get_realtype())
def is_int128(self) ‑> bool-
is_int128(self) -> bool is_type_int128(get_realtype())
def is_int16(self) ‑> bool-
is_int16(self) -> bool is_type_int16(get_realtype())
def is_int32(self) ‑> bool-
is_int32(self) -> bool is_type_int32(get_realtype())
def is_int64(self) ‑> bool-
is_int64(self) -> bool is_type_int64(get_realtype())
def is_integral(self) ‑> bool-
is_integral(self) -> bool is_type_integral(get_realtype())
def is_ldouble(self) ‑> bool-
is_ldouble(self) -> bool is_type_ldouble(get_realtype())
def is_manually_castable_to(self, target: tinfo_t) ‑> bool-
is_manually_castable_to(self, target) -> bool
@param target: tinfo_t const &
def is_one_fpval(self) ‑> bool-
is_one_fpval(self) -> bool Floating value or an object consisting of one floating member entirely.
def is_paf(self) ‑> bool-
is_paf(self) -> bool is_type_paf(get_realtype())
def is_partial(self) ‑> bool-
is_partial(self) -> bool is_type_partial(get_realtype())
def is_ptr(self) ‑> bool-
is_ptr(self) -> bool is_type_ptr(get_realtype())
def is_ptr_or_array(self) ‑> bool-
is_ptr_or_array(self) -> bool is_type_ptr_or_array(get_realtype())
def is_punknown(self) ‑> bool-
is_punknown(self) -> bool Is "_UNKNOWN *"?. This function does not check the pointer attributes and type modifiers.
def is_purging_cc(self) ‑> bool-
is_purging_cc(self) -> bool is_purging_cc(get_cc())
def is_pvoid(self) ‑> bool-
is_pvoid(self) -> bool Is "void *"?. This function does not check the pointer attributes and type modifiers.
def is_scalar(self) ‑> bool-
is_scalar(self) -> bool Does the type represent a single number?
def is_shifted_ptr(self) ‑> bool-
is_shifted_ptr(self) -> bool Is a shifted pointer?
def is_signed(self) ‑> bool-
is_signed(self) -> bool Is this a signed type?
def is_small_udt(self) ‑> bool-
is_small_udt(self) -> bool Is a small udt? (can fit a register or a pair of registers)
def is_sse_type(self) ‑> bool-
is_sse_type(self) -> bool Is a SSE vector type?
def is_struct(self) ‑> bool-
is_struct(self) -> bool is_type_struct(get_realtype())
def is_sue(self) ‑> bool-
is_sue(self) -> bool is_type_sue(get_realtype())
def is_tbyte(self) ‑> bool-
is_tbyte(self) -> bool is_type_tbyte(get_realtype())
def is_typedef(self) ‑> bool-
is_typedef(self) -> bool Is this a typedef?. This function will return true for a reference to a local type that is declared as a typedef.
def is_typeref(self) ‑> bool-
is_typeref(self) -> bool Is this type a type reference?.
def is_uchar(self) ‑> bool-
is_uchar(self) -> bool is_type_uchar(get_realtype())
def is_udm_by_til(self, idx: size_t)-
is_udm_by_til(self, idx) -> bool Was the member created due to the type system
@param idx: (C++: size_t) index of the member
def is_udt(self) ‑> bool-
is_udt(self) -> bool is_type_struni(get_realtype())
def is_uint(self) ‑> bool-
is_uint(self) -> bool is_type_uint(get_realtype())
def is_uint128(self) ‑> bool-
is_uint128(self) -> bool is_type_uint128(get_realtype())
def is_uint16(self) ‑> bool-
is_uint16(self) -> bool is_type_uint16(get_realtype())
def is_uint32(self) ‑> bool-
is_uint32(self) -> bool is_type_uint32(get_realtype())
def is_uint64(self) ‑> bool-
is_uint64(self) -> bool is_type_uint64(get_realtype())
def is_union(self) ‑> bool-
is_union(self) -> bool is_type_union(get_realtype())
def is_unknown(self) ‑> bool-
is_unknown(self) -> bool is_type_unknown(get_realtype())
def is_unsigned(self) ‑> bool-
is_unsigned(self) -> bool Is this an unsigned type?
def is_user_cc(self) ‑> bool-
is_user_cc(self) -> bool is_user_cc(get_cc())
def is_vararg_cc(self) ‑> bool-
is_vararg_cc(self) -> bool is_vararg_cc(get_cc())
def is_varmember(self) ‑> bool-
is_varmember(self) -> bool Can the type be of a variable struct member? This function checks for: is_array() && array.nelems==0 Such a member can be only the very last member of a structure
def is_varstruct(self) ‑> bool-
is_varstruct(self) -> bool Is a variable-size structure?
def is_vftable(self) ‑> bool-
is_vftable(self) -> bool Is a vftable type?
def is_void(self) ‑> bool-
is_void(self) -> bool is_type_void(get_realtype())
def is_volatile(self) ‑> bool-
is_volatile(self) -> bool is_type_volatile(get_realtype())
def is_well_defined(self) ‑> bool-
is_well_defined(self) -> bool !(empty()) && !(is_decl_partial()) && !(is_punknown())
def parse(self, decl: char const *, til: til_t = None, pt_flags: int = 0)-
parse(self, decl, til=None, pt_flags=0) -> bool Convenience function to parse a string with a type declaration
@param decl: (C++: const char ) a type declaration @param til: (C++: til_t ) type library to use @param pt_flags: (C++: int) combination of Type parsing flags bits
def present(self) ‑> bool-
present(self) -> bool Is the type really present? (not a reference to a missing type, for example)
def read_bitfield_value(self, v: uint64, bitoff: int)-
read_bitfield_value(self, v, bitoff) -> uint64
@param v: uint64 @param bitoff: int
def remove_ptr_or_array(self) ‑> bool-
remove_ptr_or_array(self) -> bool Replace the current type with the ptr obj or array element. This function performs one of the following conversions: * type[] => type * type* => type If the conversion is performed successfully, return true
def rename_edm(self, idx: size_t, name: char const *, etf_flags: uint = 0)-
rename_edm(self, idx, name, etf_flags=0) -> tinfo_code_t Rename a enum member
@param idx: (C++: size_t) index in edmvec_t @param name: (C++: const char *) new name @param etf_flags: (C++: uint) etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME @note: ETF_NO_SAVE is ignored
def rename_funcarg(self, index: size_t, name: char const *, etf_flags: uint = 0)-
rename_funcarg(self, index, name, etf_flags=0) -> tinfo_code_t Rename a function argument. The new name must be unique.
@param index: (C++: size_t) argument index in the function array @param name: (C++: const char *) new name @param etf_flags: (C++: uint) etf_flag_t @note: ETF_NO_SAVE is ignored
def rename_type(self, name: char const *, ntf_flags: int = 0)-
rename_type(self, name, ntf_flags=0) -> tinfo_code_t Rename a type
@param name: (C++: const char *) new type name @param ntf_flags: (C++: int) Flags for named types @note: The change is saved immediately
def rename_udm(self, index: size_t, name: char const *, etf_flags: uint = 0)-
rename_udm(self, index, name, etf_flags=0) -> tinfo_code_t Rename a structure/union member. The new name must be unique. @note: ETF_NO_SAVE is ignored
@param index: (C++: size_t) @param name: (C++: const char *) char const * @param etf_flags: (C++: uint)
def requires_qualifier(self, name: char const *, offset: uint64)-
requires_qualifier(self, name, offset) -> bool Requires full qualifier? (name is not unique)
@param name: (C++: const char *) field name @param offset: (C++: uint64) field offset in bits @return: if the name is not unique, returns true
def save_type(self, *args)-
save_type(self, ntf_flags=0x0001|0x0004) -> tinfo_code_t
@param ntf_flags: int
def serialize(self, *args)-
serialize(self, sudt_flags=SUDT_FAST|SUDT_TRUNC) -> PyObject Serialize tinfo_t object into a type string.
@param sudt_flags: (C++: int)
def set_attr(self, ta: type_attr_t, may_overwrite: bool = True) ‑> bool-
set_attr(self, ta, may_overwrite=True) -> bool Set a type attribute. If necessary, a new typid will be created.
@param ta: (C++: const type_attr_t &) type_attr_t const & @param may_overwrite: (C++: bool)
def set_attrs(self, tav: type_attrs_t) ‑> bool-
set_attrs(self, tav) -> bool Set type attributes. If necessary, a new typid will be created. this function modifies tav! (returns old attributes, if any)
@param tav: (C++: type_attrs_t *) @return: false: bad attributes
def set_const(self)-
set_const(self)
def set_declalign(self, declalign: uchar)-
set_declalign(self, declalign) -> bool
@param declalign: uchar
def set_edm_cmt(self, idx: size_t, cmt: char const *, etf_flags: uint = 0)-
set_edm_cmt(self, idx, cmt, etf_flags=0) -> tinfo_code_t Set a comment for an enum member. Such comments are always considered as repeatable.
@param idx: (C++: size_t) index in edmvec_t @param cmt: (C++: const char *) comment @param etf_flags: (C++: uint) etf_flag_t
def set_enum_is_bitmask(self, *args)-
set_enum_is_bitmask(self, stance=ENUMBM_ON, etf_flags=0) -> tinfo_code_t
@param stance: enum tinfo_t::bitmask_cvt_stance_t @param etf_flags: uint
def set_enum_radix(self, radix: int, sign: bool, etf_flags: uint = 0)-
set_enum_radix(self, radix, sign, etf_flags=0) -> tinfo_code_t Set enum radix to display constants
@param radix: (C++: int) radix 2, 4, 8, 16, with the special case 1 to display as character @param sign: (C++: bool) display as signed or unsigned @param etf_flags: (C++: uint) etf_flag_t
def set_enum_repr(self, repr: value_repr_t, etf_flags: uint = 0)-
set_enum_repr(self, repr, etf_flags=0) -> tinfo_code_t Set the representation of enum members.
@param repr: (C++: const value_repr_t &) value_repr_t @param etf_flags: (C++: uint) etf_flag_t
def set_enum_sign(self, sign: type_sign_t, etf_flags: uint = 0)-
set_enum_sign(self, sign, etf_flags=0) -> tinfo_code_t Set enum sign
@param sign: (C++: type_sign_t) @param etf_flags: (C++: uint) etf_flag_t
def set_enum_width(self, nbytes: int, etf_flags: uint = 0)-
set_enum_width(self, nbytes, etf_flags=0) -> tinfo_code_t Set the width of enum base type
@param nbytes: (C++: int) width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16,32,64 @param etf_flags: (C++: uint) etf_flag_t
def set_fixed_struct(self, on: bool = True)-
set_fixed_struct(self, on=True) -> tinfo_code_t Declare struct member offsets as fixed. For such structures, IDA will not recalculate the member offsets. If a member does not fit into its place anymore, it will be deleted. This function works only with structures (not unions).
@param on: (C++: bool)
def set_func_cc(self, cc: cm_t, etf_flags: uint = 0)-
set_func_cc(self, cc, etf_flags=0) -> tinfo_code_t Set function calling convention.
@param cc: (C++: cm_t) @param etf_flags: (C++: uint)
def set_func_retloc(self, argloc: argloc_t, etf_flags: uint = 0)-
set_func_retloc(self, argloc, etf_flags=0) -> tinfo_code_t Set location of function return value.
@param argloc: (C++: const argloc_t &) new location for the return value @param etf_flags: (C++: uint) etf_flag_t @return: tinfo_code_t
def set_func_rettype(self, tif: tinfo_t, etf_flags: uint = 0)-
set_func_rettype(self, tif, etf_flags=0) -> tinfo_code_t Set function return type .
@param tif: (C++: const tinfo_t &) new type for the return type @param etf_flags: (C++: uint) etf_flag_t @return: tinfo_code_t
def set_funcarg_loc(self, index: size_t, argloc: argloc_t, etf_flags: uint = 0)-
set_funcarg_loc(self, index, argloc, etf_flags=0) -> tinfo_code_t Set location of a function argument.
@param index: (C++: size_t) argument index in the function array @param argloc: (C++: const argloc_t &) new location for the argument @param etf_flags: (C++: uint) etf_flag_t @return: tinfo_code_t
def set_funcarg_type(self, index: size_t, tif: tinfo_t, etf_flags: uint = 0)-
set_funcarg_type(self, index, tif, etf_flags=0) -> tinfo_code_t Set type of a function argument.
@param index: (C++: size_t) argument index in the function array @param tif: (C++: const tinfo_t &) new type for the argument @param etf_flags: (C++: uint) etf_flag_t @return: tinfo_code_t
def set_methods(self, methods: udtmembervec_t) ‑> bool-
set_methods(self, methods) -> bool
@param BT_COMPLEX: set the list of member functions. This function consumes 'methods' (makes it empty). @return: false if this type is not a udt, or if the given list is empty
def set_modifiers(self, mod: type_t)-
set_modifiers(self, mod)
@param mod: type_t
def set_named_type(self, til: til_t, name: char const *, ntf_flags: int = 0)-
set_named_type(self, til, name, ntf_flags=0) -> tinfo_code_t
@param til: til_t * @param name: char const * @param ntf_flags: int
def set_numbered_type(self, til: til_t, ord: uint32, ntf_flags: int = 0, name: char const * = None)-
set_numbered_type(self, til, ord, ntf_flags=0, name=None) -> tinfo_code_t
@param til: til_t * @param ord: uint32 @param ntf_flags: int @param name: char const *
def set_struct_size(self, new_size: size_t)-
set_struct_size(self, new_size) -> tinfo_code_t Explicitly specify the struct size. This function works only with fixed structures. The new struct size can be equal or higher the unpadded struct size (IOW, all existing members should fit into the specified size).
@param new_size: (C++: size_t) new structure size in bytes
def set_symbol_type(self, til: til_t, name: char const *, ntf_flags: int = 0)-
set_symbol_type(self, til, name, ntf_flags=0) -> tinfo_code_t
@param til: til_t * @param name: char const * @param ntf_flags: int
def set_type_alias(self, dest_ord: uint32)-
set_type_alias(self, dest_ord) -> bool Set type alias Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype.
@param dest_ord: (C++: uint32)
def set_type_alignment(self, declalign: uchar, etf_flags: uint = 0)-
set_type_alignment(self, declalign, etf_flags=0) -> tinfo_code_t Set type alignment.
@param declalign: (C++: uchar) @param etf_flags: (C++: uint)
def set_type_cmt(self, cmt: char const *, is_regcmt: bool = False, etf_flags: uint = 0)-
set_type_cmt(self, cmt, is_regcmt=False, etf_flags=0) -> tinfo_code_t Set type comment This function works only for non-trivial types
@param cmt: (C++: const char *) char const * @param is_regcmt: (C++: bool) @param etf_flags: (C++: uint)
def set_udm_by_til(self, idx: size_t, on: bool = True, etf_flags: uint = 0)-
set_udm_by_til(self, idx, on=True, etf_flags=0) -> tinfo_code_t The member is created due to the type system
@param idx: (C++: size_t) index of the member @param on: (C++: bool) @param etf_flags: (C++: uint) etf_flag_t
def set_udm_cmt(self, index: size_t, cmt: char const *, is_regcmt: bool = False, etf_flags: uint = 0)-
set_udm_cmt(self, index, cmt, is_regcmt=False, etf_flags=0) -> tinfo_code_t Set a comment for a structure/union member. A member may have just one comment, and it is either repeatable or regular.
@param index: (C++: size_t) @param cmt: (C++: const char *) char const * @param is_regcmt: (C++: bool) @param etf_flags: (C++: uint)
def set_udm_repr(self, index: size_t, repr: value_repr_t, etf_flags: uint = 0)-
set_udm_repr(self, index, repr, etf_flags=0) -> tinfo_code_t Set the representation of a structure/union member.
@param index: (C++: size_t) @param repr: (C++: const value_repr_t &) value_repr_t const & @param etf_flags: (C++: uint)
def set_udm_type(self, index: size_t, tif: tinfo_t, etf_flags: uint = 0, repr: value_repr_t = None)-
set_udm_type(self, index, tif, etf_flags=0, repr=None) -> tinfo_code_t Set type of a structure/union member.
@param index: (C++: size_t) member index in the udm array @param tif: (C++: const tinfo_t &) new type for the member @param etf_flags: (C++: uint) etf_flag_t @param repr: (C++: const value_repr_t *) new representation for the member (optional) @return: tinfo_code_t
def set_udt_alignment(self, sda: int, etf_flags: uint = 0)-
set_udt_alignment(self, sda, etf_flags=0) -> tinfo_code_t Set declared structure alignment (sda) This alignment supersedes the alignment returned by get_declalign() and is really used when calculating the struct layout. However, the effective structure alignment may differ from
sdabecause of packing. The type editing functions (they accept etf_flags) may overwrite this attribute.@param sda: (C++: int) @param etf_flags: (C++: uint)
def set_udt_pack(self, pack: int, etf_flags: uint = 0)-
set_udt_pack(self, pack, etf_flags=0) -> tinfo_code_t Set structure packing. The value controls how little a structure member alignment can be. Example: if pack=1, then it is possible to align a double to a byte. attribute((aligned(1))) double x; However, if pack=3, a double will be aligned to 8 (2**3) even if requested to be aligned to a byte. pack==0 will have the same effect. The type editing functions (they accept etf_flags) may overwrite this attribute.
@param pack: (C++: int) @param etf_flags: (C++: uint)
def set_volatile(self)-
set_volatile(self)
def swap(self, r: tinfo_t)-
swap(self, r) Assign this = r and r = this.
@param r: (C++: tinfo_t &)
def write_bitfield_value(self, dst: uint64, v: uint64, bitoff: int)-
write_bitfield_value(self, dst, v, bitoff) -> uint64
@param dst: uint64 @param v: uint64 @param bitoff: int
class tinfo_visitor_t (s: int = 0)-
Proxy of C++ tinfo_visitor_t class.
init(self, s=0) -> tinfo_visitor_t
@param s: int
Instance variables
var state : int-
tinfo visitor states
var thisown-
The membership flag
Methods
def apply_to(self, tif: tinfo_t, out: type_mods_t = None, name: char const * = None, cmt: char const * = None)-
apply_to(self, tif, out=None, name=None, cmt=None) -> int Call this function to initiate the traversal.
@param tif: (C++: const tinfo_t &) tinfo_t const & @param out: (C++: type_mods_t ) @param name: (C++: const char ) char const * @param cmt: (C++: const char *) char const *
def prune_now(self)-
prune_now(self) To refuse to visit children of the current type, use this:
def visit_type(self, out: type_mods_t, tif: tinfo_t, name: char const *, cmt: char const *)-
visit_type(self, out, tif, name, cmt) -> int Visit a subtype. this function must be implemented in the derived class. it may optionally fill out with the new type info. this can be used to modify types (in this case the 'out' argument of apply_to() may not be nullptr) return 0 to continue the traversal. return !=0 to stop the traversal.
@param out: (C++: type_mods_t ) @param tif: (C++: const tinfo_t &) tinfo_t const & @param name: (C++: const char ) char const * @param cmt: (C++: const char *) char const *
class type_attr_t-
Proxy of C++ type_attr_t class.
init(self) -> type_attr_t
Instance variables
var key : qstring-
one symbol keys are reserved to be used by the kernel the ones starting with an underscore are reserved too
var thisown-
The membership flag
var value : bytevec_t-
attribute bytes
class type_attrs_t (*args)-
Proxy of C++ qvector< type_attr_t > class.
init(self) -> type_attrs_t init(self, x) -> type_attrs_t
@param x: qvector< type_attr_t > const &
Instance variables
var thisown-
The membership flag
Methods
def at(self, _idx: size_t)-
at(self, _idx) -> type_attr_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> type_attr_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> type_attr_t
def erase(self, *args)-
erase(self, it) -> type_attr_t
@param it: qvector< type_attr_t >::iterator
erase(self, first, last) -> type_attr_t
@param first: qvector< type_attr_t >::iterator @param last: qvector< type_attr_t >::iterator
def extract(self)-
extract(self) -> type_attr_t
def front(self)def grow(self, *args)-
grow(self, x=type_attr_t())
@param x: type_attr_t const &
def inject(self, s: type_attr_t, len: size_t)-
inject(self, s, len)
@param s: type_attr_t * @param len: size_t
def insert(self, it: type_attr_t, x: type_attr_t)-
insert(self, it, x) -> type_attr_t
@param it: qvector< type_attr_t >::iterator @param x: type_attr_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: type_attr_t const &
push_back(self) -> type_attr_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: type_attr_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: type_attrs_t)-
swap(self, r)
@param r: qvector< type_attr_t > &
def truncate(self)-
truncate(self)
class type_mods_t-
Proxy of C++ type_mods_t class.
init(self) -> type_mods_t
Instance variables
var cmt : qstring-
comment for current type
var flags : int-
Type modification bits
var name : qstring-
current type name
var thisown-
The membership flag
var type : tinfo_t-
current type
Methods
def clear(self)-
clear(self)
def has_cmt(self) ‑> bool-
has_cmt(self) -> bool
def has_info(self) ‑> bool-
has_info(self) -> bool
def has_name(self) ‑> bool-
has_name(self) -> bool
def has_type(self) ‑> bool-
has_type(self) -> bool
def is_rptcmt(self) ‑> bool-
is_rptcmt(self) -> bool
def set_new_cmt(self, c: qstring const &, rptcmt: bool)-
set_new_cmt(self, c, rptcmt)
@param c: qstring const & @param rptcmt: bool
def set_new_name(self, n: qstring const &)-
set_new_name(self, n)
@param n: qstring const &
def set_new_type(self, t: tinfo_t)-
set_new_type(self, t) The visit_type() function may optionally save the modified type info. Use the following functions for that. The new name and comment will be applied only if the current tinfo element has storage for them.
@param t: (C++: const tinfo_t &) tinfo_t const &
class typedef_type_data_t (*args)-
Proxy of C++ typedef_type_data_t class.
init(self, _til, _name, _resolve=False) -> typedef_type_data_t
@param _til: til_t const * @param _name: char const * @param _resolve: bool
init(self, _til, ord, _resolve=False) -> typedef_type_data_t
@param _til: til_t const * @param ord: uint32 @param _resolve: bool
Instance variables
var is_ordref : bool-
is reference by ordinal?
var name : char const *-
is_ordref=false: target type name. we do not own this pointer!
var ordinal : uint32-
is_ordref=true: type ordinal number
var resolve : bool-
should resolve immediately?
var thisown-
The membership flag
var til : til_t const *-
type library to use when resolving
Methods
def swap(self, r: typedef_type_data_t)-
swap(self, r)
@param r: typedef_type_data_t &
class udm_t-
Proxy of C++ udm_t class.
init(self) -> udm_t
Instance variables
var cmt : qstring-
member comment
var effalign : int-
effective field alignment (in bytes)
var fda : uchar-
field alignment (shift amount)
var name : qstring-
member name
var offset : uint64-
member offset in bits
var repr : value_repr_t-
radix, refinfo, strpath, custom_id, strtype
var size : uint64-
size in bits
var tafld_bits : uint32-
TAH bits.
var thisown-
The membership flag
var type : tinfo_t-
member type
Methods
def begin(self)-
begin(self) -> uint64
def can_be_dtor(self) ‑> bool-
can_be_dtor(self) -> bool
def can_rename(self) ‑> bool-
can_rename(self) -> bool
def clr_baseclass(self)-
clr_baseclass(self)
def clr_method(self)-
clr_method(self)
def clr_unaligned(self)-
clr_unaligned(self)
def clr_vftable(self)-
clr_vftable(self)
def clr_virtbase(self)-
clr_virtbase(self)
def end(self)-
end(self) -> uint64
def is_anonymous_udm(self) ‑> bool-
is_anonymous_udm(self) -> bool
def is_baseclass(self) ‑> bool-
is_baseclass(self) -> bool
def is_bitfield(self) ‑> bool-
is_bitfield(self) -> bool
def is_by_til(self) ‑> bool-
is_by_til(self) -> bool
def is_gap(self) ‑> bool-
is_gap(self) -> bool
def is_method(self) ‑> bool-
is_method(self) -> bool
def is_regcmt(self) ‑> bool-
is_regcmt(self) -> bool
def is_retaddr(self) ‑> bool-
is_retaddr(self) -> bool
def is_savregs(self) ‑> bool-
is_savregs(self) -> bool
def is_special_member(self) ‑> bool-
is_special_member(self) -> bool
def is_unaligned(self) ‑> bool-
is_unaligned(self) -> bool
def is_vftable(self) ‑> bool-
is_vftable(self) -> bool
def is_virtbase(self) ‑> bool-
is_virtbase(self) -> bool
def is_zero_bitfield(self) ‑> bool-
is_zero_bitfield(self) -> bool
def make_gap(self, byteoff: uval_t, nbytes: uval_t)-
make_gap(self, byteoff, nbytes) -> bool
@param byteoff: uval_t @param nbytes: uval_t
def set_baseclass(self, on: bool = True)-
set_baseclass(self, on=True)
@param on: bool
def set_by_til(self, on: bool = True)-
set_by_til(self, on=True)
@param on: bool
def set_method(self, on: bool = True)-
set_method(self, on=True)
@param on: bool
def set_regcmt(self, on: bool = True)-
set_regcmt(self, on=True)
@param on: bool
def set_retaddr(self, on: bool = True)-
set_retaddr(self, on=True)
@param on: bool
def set_savregs(self, on: bool = True)-
set_savregs(self, on=True)
@param on: bool
def set_unaligned(self, on: bool = True)-
set_unaligned(self, on=True)
@param on: bool
def set_value_repr(self, r: value_repr_t)-
set_value_repr(self, r)
@param r: value_repr_t const &
def set_vftable(self, on: bool = True)-
set_vftable(self, on=True)
@param on: bool
def set_virtbase(self, on: bool = True)-
set_virtbase(self, on=True)
@param on: bool
def swap(self, r: udm_t)-
swap(self, r)
@param r: udm_t &
class udt_member_t-
Proxy of C++ udm_t class.
init(self) -> udm_t
Instance variables
var cmt : qstring-
member comment
var effalign : int-
effective field alignment (in bytes)
var fda : uchar-
field alignment (shift amount)
var name : qstring-
member name
var offset : uint64-
member offset in bits
var repr : value_repr_t-
radix, refinfo, strpath, custom_id, strtype
var size : uint64-
size in bits
var tafld_bits : uint32-
TAH bits.
var thisown-
The membership flag
var type : tinfo_t-
member type
Methods
def begin(self)-
begin(self) -> uint64
def can_be_dtor(self) ‑> bool-
can_be_dtor(self) -> bool
def can_rename(self) ‑> bool-
can_rename(self) -> bool
def clr_baseclass(self)-
clr_baseclass(self)
def clr_method(self)-
clr_method(self)
def clr_unaligned(self)-
clr_unaligned(self)
def clr_vftable(self)-
clr_vftable(self)
def clr_virtbase(self)-
clr_virtbase(self)
def end(self)-
end(self) -> uint64
def is_anonymous_udm(self) ‑> bool-
is_anonymous_udm(self) -> bool
def is_baseclass(self) ‑> bool-
is_baseclass(self) -> bool
def is_bitfield(self) ‑> bool-
is_bitfield(self) -> bool
def is_by_til(self) ‑> bool-
is_by_til(self) -> bool
def is_gap(self) ‑> bool-
is_gap(self) -> bool
def is_method(self) ‑> bool-
is_method(self) -> bool
def is_regcmt(self) ‑> bool-
is_regcmt(self) -> bool
def is_retaddr(self) ‑> bool-
is_retaddr(self) -> bool
def is_savregs(self) ‑> bool-
is_savregs(self) -> bool
def is_special_member(self) ‑> bool-
is_special_member(self) -> bool
def is_unaligned(self) ‑> bool-
is_unaligned(self) -> bool
def is_vftable(self) ‑> bool-
is_vftable(self) -> bool
def is_virtbase(self) ‑> bool-
is_virtbase(self) -> bool
def is_zero_bitfield(self) ‑> bool-
is_zero_bitfield(self) -> bool
def make_gap(self, byteoff: uval_t, nbytes: uval_t)-
make_gap(self, byteoff, nbytes) -> bool
@param byteoff: uval_t @param nbytes: uval_t
def set_baseclass(self, on: bool = True)-
set_baseclass(self, on=True)
@param on: bool
def set_by_til(self, on: bool = True)-
set_by_til(self, on=True)
@param on: bool
def set_method(self, on: bool = True)-
set_method(self, on=True)
@param on: bool
def set_regcmt(self, on: bool = True)-
set_regcmt(self, on=True)
@param on: bool
def set_retaddr(self, on: bool = True)-
set_retaddr(self, on=True)
@param on: bool
def set_savregs(self, on: bool = True)-
set_savregs(self, on=True)
@param on: bool
def set_unaligned(self, on: bool = True)-
set_unaligned(self, on=True)
@param on: bool
def set_value_repr(self, r: value_repr_t)-
set_value_repr(self, r)
@param r: value_repr_t const &
def set_vftable(self, on: bool = True)-
set_vftable(self, on=True)
@param on: bool
def set_virtbase(self, on: bool = True)-
set_virtbase(self, on=True)
@param on: bool
def swap(self, r: udm_t)-
swap(self, r)
@param r: udm_t &
class udm_visitor_t-
Proxy of C++ udm_visitor_t class.
init(self) -> udm_visitor_t
@param self: PyObject *
Instance variables
var thisown-
The membership flag
Methods
def visit_udm(self, tid: tid_t, tif: tinfo_t, udt: udt_type_data_t, idx: ssize_t)-
visit_udm(self, tid, tif, udt, idx) -> int
@param tid: (C++: tid_t) udt tid @param tif: (C++: const tinfo_t ) udt type info (may be nullptr for corrupted idbs) @param udt: (C++: const udt_type_data_t ) udt type data (may be nullptr for corrupted idbs) @param idx: (C++: ssize_t) the index of udt the member (may be -1 if udm was not found)
class udt_type_data_t-
Proxy of C++ udt_type_data_t class.
init(self) -> udt_type_data_t
Ancestors
Instance variables
var effalign : uint32-
effective structure alignment (in bytes)
var is_union : bool-
is union or struct?
var pack : uchar-
pragma pack() alignment (shift amount)
var sda : uchar-
declared structure alignment (shift amount+1). 0 - unspecified
var taudt_bits : uint32-
TA… and TAUDT… bits.
var total_size : size_t-
total structure size in bytes
var unpadded_size : size_t-
unpadded structure size in bytes
var version : uchar-
version of udt_type_data_t
Methods
def find_member(self, *args)-
find_member(self, pattern_udm, strmem_flags) -> ssize_t
@param pattern_udm: udm_t * @param strmem_flags: int
find_member(self, name) -> ssize_t
@param name: char const *
find_member(self, bit_offset) -> ssize_t
@param bit_offset: uint64
def get_best_fit_member(self, disp: asize_t)-
get_best_fit_member(self, disp) -> ssize_t Get member that is most likely referenced by the specified offset. Useful for offsets > sizeof(struct).
@param disp: (C++: asize_t)
def is_cppobj(self) ‑> bool-
is_cppobj(self) -> bool
def is_fixed(self) ‑> bool-
is_fixed(self) -> bool
def is_last_baseclass(self, idx: size_t)-
is_last_baseclass(self, idx) -> bool
@param idx: size_t
def is_msstruct(self) ‑> bool-
is_msstruct(self) -> bool
def is_unaligned(self) ‑> bool-
is_unaligned(self) -> bool
def is_vftable(self) ‑> bool-
is_vftable(self) -> bool
def set_fixed(self, on: bool = True)-
set_fixed(self, on=True)
@param on: bool
def set_vftable(self, on: bool = True)-
set_vftable(self, on=True)
@param on: bool
def swap(self, r: udt_type_data_t)-
swap(self, r)
@param r: udt_type_data_t &
Inherited members
class udtmembervec_t-
Proxy of C++ udtmembervec_t class.
init(self) -> udtmembervec_t
Ancestors
Subclasses
Inherited members
class udtmembervec_template_t (*args)-
Proxy of C++ qvector< udm_t > class.
init(self) -> udtmembervec_template_t init(self, x) -> udtmembervec_template_t
@param x: qvector< udm_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def add_unique(self, x: udm_t) ‑> bool-
add_unique(self, x) -> bool
@param x: udm_t const &
def at(self, _idx: size_t)-
at(self, _idx) -> udm_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> udm_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> udm_t
def erase(self, *args)-
erase(self, it) -> udm_t
@param it: qvector< udm_t >::iterator
erase(self, first, last) -> udm_t
@param first: qvector< udm_t >::iterator @param last: qvector< udm_t >::iterator
def extract(self)-
extract(self) -> udm_t
def find(self, *args)-
find(self, x) -> udm_t
@param x: udm_t const &
def front(self)def grow(self, *args)-
grow(self, x=udm_t())
@param x: udm_t const &
def has(self, x: udm_t) ‑> bool-
has(self, x) -> bool
@param x: udm_t const &
def inject(self, s: udm_t, len: size_t)-
inject(self, s, len)
@param s: udm_t * @param len: size_t
def insert(self, it: udm_t, x: udm_t)-
insert(self, it, x) -> udm_t
@param it: qvector< udm_t >::iterator @param x: udm_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: udm_t const &
push_back(self) -> udm_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: udm_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: udtmembervec_template_t)-
swap(self, r)
@param r: qvector< udm_t > &
def truncate(self)-
truncate(self)
class valstr_t-
Proxy of C++ valstr_t class.
init(self) -> valstr_t
Instance variables
var info : valinfo_t *-
additional info
var length : size_t-
length if printed on one line
var members : valstrs_t *-
strings for members, each member separately
var oneline : qstring-
result if printed on one line in UTF-8 encoding
var props : int-
temporary properties, used internally
var thisown-
The membership flag
class valstrs_t-
Proxy of C++ valstrs_t class.
init(self) -> valstrs_t
Ancestors
Inherited members
class valstrvec_t (*args)-
Proxy of C++ qvector< valstr_t > class.
init(self) -> valstrvec_t init(self, x) -> valstrvec_t
@param x: qvector< valstr_t > const &
Subclasses
Instance variables
var thisown-
The membership flag
Methods
def at(self, _idx: size_t)-
at(self, _idx) -> valstr_t
@param _idx: size_t
def back(self)def begin(self, *args)-
begin(self) -> valstr_t
def capacity(self)-
capacity(self) -> size_t
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def end(self, *args)-
end(self) -> valstr_t
def erase(self, *args)-
erase(self, it) -> valstr_t
@param it: qvector< valstr_t >::iterator
erase(self, first, last) -> valstr_t
@param first: qvector< valstr_t >::iterator @param last: qvector< valstr_t >::iterator
def extract(self)-
extract(self) -> valstr_t
def front(self)def grow(self, *args)-
grow(self, x=valstr_t())
@param x: valstr_t const &
def inject(self, s: valstr_t, len: size_t)-
inject(self, s, len)
@param s: valstr_t * @param len: size_t
def insert(self, it: valstr_t, x: valstr_t)-
insert(self, it, x) -> valstr_t
@param it: qvector< valstr_t >::iterator @param x: valstr_t const &
def pop_back(self)-
pop_back(self)
def push_back(self, *args)-
push_back(self, x)
@param x: valstr_t const &
push_back(self) -> valstr_t
def qclear(self)-
qclear(self)
def reserve(self, cnt: size_t)-
reserve(self, cnt)
@param cnt: size_t
def resize(self, *args)-
resize(self, _newsize, x)
@param _newsize: size_t @param x: valstr_t const &
resize(self, _newsize)
@param _newsize: size_t
def size(self)-
size(self) -> size_t
def swap(self, r: valstrvec_t)-
swap(self, r)
@param r: qvector< valstr_t > &
def truncate(self)-
truncate(self)
class value_repr_t-
Proxy of C++ value_repr_t class.
init(self) -> value_repr_t
Instance variables
var ap : array_parameters_t-
FRB_TABFORM, AP_SIGNED is ignored, use FRB_SIGNED instead
var bits : uint64-
bits
var cd : custom_data_type_info_t-
FRB_CUSTOM.
var delta : adiff_t-
FRB_STROFF.
var ri : refinfo_t-
FRB_OFFSET.
var strtype : int32-
FRB_STRLIT.
var thisown-
The membership flag
var type_ordinal : uint32-
FRB_STROFF, FRB_ENUM.
Methods
def clear(self)-
clear(self)
def empty(self) ‑> bool-
empty(self) -> bool
def from_opinfo(self, flags: flags64_t, afl: aflags_t, opinfo: opinfo_t, _ap: array_parameters_t)-
from_opinfo(self, flags, afl, opinfo, _ap) -> bool
@param flags: flags64_t @param afl: aflags_t @param opinfo: opinfo_t const * @param _ap: array_parameters_t const *
def get_vtype(self)-
get_vtype(self) -> uint64
def has_lzeroes(self) ‑> bool-
has_lzeroes(self) -> bool
def has_tabform(self) ‑> bool-
has_tabform(self) -> bool
def init_ap(self, _ap: array_parameters_t)-
init_ap(self, _ap)
@param _ap: array_parameters_t *
def is_custom(self) ‑> bool-
is_custom(self) -> bool
def is_enum(self) ‑> bool-
is_enum(self) -> bool
def is_offset(self) ‑> bool-
is_offset(self) -> bool
def is_signed(self) ‑> bool-
is_signed(self) -> bool
def is_strlit(self) ‑> bool-
is_strlit(self) -> bool
def is_stroff(self) ‑> bool-
is_stroff(self) -> bool
def is_typref(self) ‑> bool-
is_typref(self) -> bool
def parse_value_repr(self, *args) ‑> bool-
parse_value_repr(self, attr, target_type=BTF_STRUCT) -> bool
@param attr: qstring const & @param target_type: type_t
def set_ap(self, _ap: array_parameters_t)-
set_ap(self, _ap)
@param _ap: array_parameters_t const &
def set_lzeroes(self, on: bool)-
set_lzeroes(self, on)
@param on: bool
def set_signed(self, on: bool)-
set_signed(self, on)
@param on: bool
def set_tabform(self, on: bool)-
set_tabform(self, on)
@param on: bool
def set_vtype(self, vt: uint64)-
set_vtype(self, vt)
@param vt: uint64
def swap(self, r: value_repr_t)-
swap(self, r)
@param r: value_repr_t &