Module index

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 ABS_NO
ABS_NO = 1
var ABS_UNK
ABS_UNK = 0
var ABS_YES
ABS_YES = 2
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_CONSUME_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_POLICY_UNDEFINED
ARGREGS_POLICY_UNDEFINED = 0
var BADORD
BADORD = 4294967295
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
BTMT_ENUM = 32
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
BTMT_STRUCT = 0
var BTMT_TYPEDEF
named reference always p_string name
var BTMT_UNION
BTMT_UNION = 16
var BTMT_UNKSIGN
unknown signedness
var BTMT_UNSIGNED
BTMT_UNSIGNED = 32
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 CCN_C
CCN_C = 0
var CCN_CPP
CCN_CPP = 1
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_MASK
CM_CC_MASK = 240
var CM_CC_PASCAL
stack, purged, reverse order of args
var CM_CC_RESERVE3
CM_CC_RESERVE3 = 192
var CM_CC_SPECIAL
CM_CC_SPECIAL = 240
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_MASK
CM_MASK = 3
var CM_M_FF
CM_M_FF = 4
var CM_M_FN
CM_M_FN = 12
var CM_M_MASK
CM_M_MASK = 12
var CM_M_NF
CM_M_NF = 8
var CM_M_NN
CM_M_NN = 0
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_MASK
COMP_MASK = 15
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 C_PC_COMPACT
C_PC_COMPACT = 10
var C_PC_FLAT
C_PC_FLAT = 3
var C_PC_HUGE
C_PC_HUGE = 6
var C_PC_LARGE
C_PC_LARGE = 6
var C_PC_MEDIUM
C_PC_MEDIUM = 14
var C_PC_SMALL
C_PC_SMALL = 2
var C_PC_TINY
C_PC_TINY = 2
var DEFMASK64
default bitmask 64bits
var ETF_ASMENUM
asm enum compatibility mode *-
var ETF_AUTONAME
generate a member name if was not specified (add_udm, set_udm_type)
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
mptr is function argument (cannot create arrays)
var ETF_MAY_DESTROY
may destroy other members
var ETF_NO_IDBSYNC
do not sync type to IDB (udt only) *-
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 FMTFUNC_PRINTF
FMTFUNC_PRINTF = 0
var FMTFUNC_SCANF
FMTFUNC_SCANF = 1
var FMTFUNC_STRFMON
FMTFUNC_STRFMON = 3
var FMTFUNC_STRFTIME
FMTFUNC_STRFTIME = 2
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
HTI_EXT = 4
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
HTI_INT = 2
var HTI_LEX
HTI_LEX = 8
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
HTI_UNP = 16
var IMPTYPE_LOCAL
the type is local, the struct/enum won't be marked as til type. there is no need to specify this bit if til==idati, the kernel will set it automatically
var IMPTYPE_OVERRIDE
IMPTYPE_OVERRIDE = 2
var IMPTYPE_VERBOSE
IMPTYPE_VERBOSE = 1
var MAX_DECL_ALIGN
MAX_DECL_ALIGN = 15
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_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
PRTYPE_DEF = 32
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
PRTYPE_METHODS = 4096
var PRTYPE_MULTI
print to many lines
var PRTYPE_NOARGS
PRTYPE_NOARGS = 64
var PRTYPE_NOARRS
PRTYPE_NOARRS = 128
var PRTYPE_NOREGEX
do not apply regular expressions to beautify name
var PRTYPE_NORES
PRTYPE_NORES = 256
var PRTYPE_PRAGMA
print pragmas for alignment
var PRTYPE_RESTORE
PRTYPE_RESTORE = 512
var PRTYPE_SEMI
append ; to the end
var PRTYPE_TYPE
print type declaration (not variable declaration)
var PT_FILE
PT_FILE = 65536
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_LAST
STI_LAST = 30
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_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_MASK
STRMEM_MASK = 7
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_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_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 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
SUDT_SERDEF = 512
var SUDT_SORT
fields are not sorted by offset, sort them first
var SUDT_TRUNC
SUDT_TRUNC = 256
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
TAENUM_64BIT = 32
var TAENUM_BIN
TAENUM_BIN = 512
var TAENUM_LZERO
TAENUM_LZERO = 2048
var TAENUM_NUMSIGN
TAENUM_NUMSIGN = 1024
var TAENUM_OCT
TAENUM_OCT = 256
var TAENUM_SIGNED
TAENUM_SIGNED = 128
var TAENUM_UNSIGNED
TAENUM_UNSIGNED = 64
var TAFLD_BASECLASS
TAFLD_BASECLASS = 32
var TAFLD_GAP
TAFLD_GAP = 1024
var TAFLD_METHOD
denotes a udt member function
var TAFLD_REGCMT
TAFLD_REGCMT = 2048
var TAFLD_UNALIGNED
TAFLD_UNALIGNED = 64
var TAFLD_VFTABLE
TAFLD_VFTABLE = 256
var TAFLD_VIRTBASE
TAFLD_VIRTBASE = 128
var TAH_ALL
all defined bits
var TAH_BYTE
type attribute header byte
var TAH_HASATTRS
has extended attributes
var TAPTR_PTR32
TAPTR_PTR32 = 32
var TAPTR_PTR64
TAPTR_PTR64 = 64
var TAPTR_RESTRICT
TAPTR_RESTRICT = 96
var TAPTR_SHIFTED
TAPTR_SHIFTED = 128
var TAUDT_CPPOBJ
TAUDT_CPPOBJ = 128
var TAUDT_MSSTRUCT
TAUDT_MSSTRUCT = 32
var TAUDT_UNALIGNED
TAUDT_UNALIGNED = 64
var TAUDT_VFTABLE
TAUDT_VFTABLE = 256
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_BADSYNC
TERR_BADSYNC = -4
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_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_SYNC
failed to synchronize with IDB
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_COUNT
TERR_COUNT = 36
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
TERR_SAVE = -1
var TERR_SAVE_ERROR
failed to save
var TERR_SERIALIZE
failed to serialize
var TERR_STOCK
stock type info cannot be modified
var TERR_UNION_BF
unions cannot have bitfields
var TERR_WRONGNAME
TERR_WRONGNAME = -3
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 TPOS_LNNUM
TPOS_LNNUM = '\x05'
var TPOS_REGCMT
TPOS_REGCMT = '\x06'
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_LEVEL
TVST_LEVEL = 4
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 UTP_ENUM
UTP_ENUM = 0
var UTP_STRUCT
UTP_STRUCT = 1
var VALSTR_OPEN
printed opening curly brace '{'
var VTBL_MEMNAME
VTBL_MEMNAME = '__vftable'
var VTBL_SUFFIX
VTBL_SUFFIX = '_vtbl'
var no_sign
no sign, or unknown
var sc_auto
sc_auto = 5
var sc_ext
sc_ext = 2
var sc_friend
sc_friend = 6
var sc_reg
sc_reg = 4
var sc_stat
sc_stat = 3
var sc_type
sc_type = 1
var sc_unk
sc_unk = 0
var sc_virt
sc_virt = 7
var type_signed
signed type
var type_unsigned
unsigned type

Functions

def add_til(*args) ‑> 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.
name: (C++: const char *) til name
flags: (C++: int) combination of Load TIL flags
return: one of Load TIL result codes
def alloc_type_ordinal(*args) ‑> uint32
alloc_type_ordinal(ti) -> uint32
alloc_type_ordinals(ti, 1)
ti: (C++: til_t *)
def alloc_type_ordinals(*args) ‑> uint32
alloc_type_ordinals(ti, qty) -> uint32
Allocate a range of ordinal numbers for new types.
ti: (C++: til_t *) type library
qty: (C++: int) number of ordinals to allocate
return: the first ordinal. 0 means failure.
def append_abi_opts(*args) ‑> bool
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-...
abi_opts: (C++: const char *) - ABI options to add/remove in form opt1-opt2-...
user_level: (C++: bool) - initiated by user if TRUE (==SETCOMP_BY_USER)
return: success
def append_argloc(*args) ‑> bool
append_argloc(out, vloc) -> bool
Serialize argument location
out: (C++: qtype *)
vloc: (C++: const argloc_t &) argloc_t const &
def append_tinfo_covered(*args) ‑> bool
append_tinfo_covered(out, typid, offset) -> bool
out: rangeset_t *
typid: uint32
offset: uint64
def apply_callee_tinfo(*args) ‑> bool
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.
caller: (C++: ea_t) linear address of the calling instruction. must belong to a
function.
tif: (C++: const tinfo_t &) type info
return: success
def apply_cdecl(*args) ‑> bool
apply_cdecl(til, ea, decl, flags=0) -> bool
Apply the specified type to the address. This function parses the declaration and calls apply_tinfo()
til: (C++: til_t *) type library
ea: (C++: ea_t) linear address
decl: (C++: const char *) type declaration in C form
flags: (C++: int) flags to pass to apply_tinfo (TINFO_DEFINITE is always passed)
return: success
def apply_named_type(*args) ‑> bool
apply_named_type(ea, name) -> bool
Apply the specified named type to the address.
ea: (C++: ea_t) linear address
name: (C++: const char *) the type name, e.g. "FILE"
return: success
def apply_once_tinfo_and_name(*args) ‑> bool
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.
dea: (C++: ea_t) linear address
tif: (C++: const tinfo_t &) type string in the internal format
name: (C++: const char *) new name for the address
return: success
def apply_tinfo(*args) ‑> bool
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.
ea: (C++: ea_t) linear address
tif: (C++: const tinfo_t &) type string in internal format
flags: (C++: uint32) combination of Apply tinfo flags
return: success
def apply_tinfo_to_stkarg(*args) ‑> bool
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
insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &)
x: (C++: const op_t &) op_t const &
v: (C++: uval_t)
tif: (C++: const tinfo_t &) tinfo_t const &
name: (C++: const char *) char const *
def apply_type(*args) ‑> bool
apply_type(ti, type, fields, ea, flags) -> bool
Apply the specified type to the address
ti: Type info library. 'None' can be used.
type: type_t const *
fields: p_list const *
ea: the address of the object
flags: combination of TINFO_... constants or 0
return: Boolean
def begin_type_updating(*args) ‑> void
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()
utp: (C++: update_type_t) enum update_type_t
def calc_c_cpp_name(*args) ‑> qstring *
calc_c_cpp_name(name, type, ccn_flags) -> str
Get C or C++ form of the name.
name: (C++: const char *) original (mangled or decorated) name
type: (C++: const tinfo_t *) name type if known, otherwise nullptr
ccn_flags: (C++: int) one of C/C++ naming flags
def calc_number_of_children(*args) ‑> 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).
loc: (C++: const argloc_t &) location of the data (ALOC_STATIC or ALOC_CUSTOM)
tif: (C++: const tinfo_t &) type info
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(*args) ‑> bool
calc_tinfo_gaps(out, typid) -> bool
out: rangeset_t *
typid: uint32
def calc_type_size(*args) ‑> PyObject *
calc_type_size(ti, tp) -> PyObject *
Returns the size of a type
ti: Type info library. 'None' can be passed.
tp: serialized type byte string
return: - None on failure
  • The size of the type
def callregs_t_regcount(*args) ‑> int
callregs_t_regcount(cc) -> int
cc: cm_t
def choose_local_tinfo(*args) ‑> uint32
choose_local_tinfo(ti, title, func=None, def_ord=0, ud=None) -> uint32
Choose a type from the local type library.
ti: (C++: const til_t *) pointer to til
title: (C++: const char *) title of listbox to display
func: (C++: local_tinfo_predicate_t *) predicate to select types to display (maybe nullptr)
def_ord: (C++: uint32) ordinal to position cursor before choose
ud: (C++: void *) user data
return: == 0 means nothing is chosen, otherwise an ordinal number
def choose_local_tinfo_and_delta(*args) ‑> uint32
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.
delta: (C++: int32 *) pointer shift value
ti: (C++: const til_t *) pointer to til
title: (C++: const char *) title of listbox to display
func: (C++: local_tinfo_predicate_t *) predicate to select types to display (maybe nullptr)
def_ord: (C++: uint32) ordinal to position cursor before choose
ud: (C++: void *) user data
return: == 0 means nothing is chosen, otherwise an ordinal number
def choose_named_type(*args) ‑> bool
choose_named_type(out_sym, root_til, title, ntf_flags, predicate=None) -> bool
Choose a type from a type library.
out_sym: (C++: til_symbol_t *) pointer to be filled with the chosen type
root_til: (C++: const til_t *) pointer to starting til (the function will inspect the base
tils if allowed by flags)
title: (C++: const char *) title of listbox to display
ntf_flags: (C++: int) combination of Flags for named types
predicate: (C++: predicate_t *) predicate to select types to display (maybe nullptr)
return: false if nothing is chosen, otherwise true
def clear_tinfo_t(*args) ‑> void
clear_tinfo_t(_this)
_this: tinfo_t *
def compact_til(*args) ‑> bool
compact_til(ti) -> bool
Collect garbage in til. Must be called before storing the til.
ti: (C++: til_t *)
return: true if any memory was freed
def compare_tinfo(*args) ‑> bool
compare_tinfo(t1, t2, tcflags) -> bool
t1: uint32
t2: uint32
tcflags: int
def convert_pt_flags_to_hti(*args) ‑> 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)
pt_flags: (C++: int)
def copy_named_type(*args) ‑> uint32
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.
dsttil: (C++: til_t *) Destination til. It must have orginal types enabled
srctil: (C++: const til_t *) Source til.
name: (C++: const char *) name of the type to copy
return: ordinal number of the copied type. 0 means error
def copy_tinfo_t(*args) ‑> void
copy_tinfo_t(_this, r)
_this: tinfo_t *
r: tinfo_t const &
def create_enum_type(*args) ‑> tid_t
create_enum_type(enum_name, ei, enum_width, sign, convert_to_bitmask, enum_cmt=None) -> tid_t
Create type enum
enum_name: (C++: const char *) type name
ei: (C++: enum_type_data_t &) enum type data
enum_width: (C++: int) the width of an enum element allowed values: 0
(unspecified),1,2,4,8,16,32,64
sign: (C++: type_sign_t) enum sign
convert_to_bitmask: (C++: bool) try convert enum to bitmask enum
enum_cmt: (C++: const char *) enum type comment
return: enum TID
def create_numbered_type_name(*args) ‑> qstring *
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
ord: (C++: int32)
def create_tinfo(*args) ‑> bool
create_tinfo(_this, bt, bt2, ptr) -> bool
_this: tinfo_t *
bt: type_t
bt2: type_t
ptr: void *
def create_tinfo2(*args) ‑> bool
create_tinfo2(_this, bt, bt2, ptr) -> bool
_this: tinfo_t *
bt: type_t
bt2: type_t
ptr: void *
def default_compiler(*args) ‑> comp_t
default_compiler() -> comp_t
Get compiler specified by inf.cc.
def del_named_type(*args) ‑> bool
del_named_type(ti, name, ntf_flags) -> bool
Delete information about a symbol.
ti: (C++: til_t *) type library
name: (C++: const char *) name of symbol
ntf_flags: (C++: int) combination of Flags for named types
return: success
def del_numbered_type(*args) ‑> bool
del_numbered_type(ti, ordinal) -> bool
Delete a numbered type.
ti: (C++: til_t *)
ordinal: (C++: uint32)
def del_til(*args) ‑> bool
del_til(name) -> bool
Unload a til file.
name: (C++: const char *) char const *
def del_tinfo_attr(*args) ‑> bool
del_tinfo_attr(tif, key, make_copy) -> bool
tif: tinfo_t *
key: qstring const &
make_copy: bool
def del_vftable_ea(*args) ‑> bool
del_vftable_ea(ordinal) -> bool
Delete the address of a vftable instance for a vftable type.
ordinal: (C++: uint32) ordinal number of a vftable type.
return: success
def deref_ptr(*args) ‑> bool
deref_ptr(ptr_ea, tif, closure_obj=None) -> bool
Dereference a pointer.
ptr_ea: (C++: ea_t *) in/out parameter
  • in: address of the pointer
  • out: the pointed address
tif: (C++: const tinfo_t &) type of the pointer
closure_obj: (C++: ea_t *) closure object (not used yet)
return: success
def deserialize_tinfo(*args) ‑> bool
deserialize_tinfo(tif, til, ptype, pfields, pfldcmts, cmt=None) -> bool
tif: tinfo_t *
til: til_t const *
ptype: type_t const **
pfields: p_list const **
pfldcmts: p_list const **
cmt: char const *
def dstr_tinfo(*args) ‑> char const *
dstr_tinfo(tif) -> char const *
tif: tinfo_t const *
def dump_func_type_data(*args) ‑> qstring *
dump_func_type_data(fti, praloc_bits) -> str
Use func_type_data_t::dump()
fti: (C++: const func_type_data_t &) func_type_data_t const &
praloc_bits: (C++: int)
def enable_numbered_types(*args) ‑> 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
ti: (C++: til_t *)
enable: (C++: bool)
def end_type_updating(*args) ‑> void
end_type_updating(utp)
Mark the end of a large update operation on the types (see begin_type_updating())
utp: (C++: update_type_t) enum update_type_t
def enum_type_data_t__get_max_serial(*args) ‑> uchar
enum_type_data_t__get_max_serial(ei, value) -> uchar
ei: enum_type_data_t const *
value: uint64
def extract_argloc(*args) ‑> 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
vloc: (C++: argloc_t *)
ptype: (C++: const type_t **) type_t const **
forbid_stkoff: (C++: bool)
def find_tinfo_udt_member(*args) ‑> int
find_tinfo_udt_member(udm, typid, strmem_flags) -> int
udm: udm_t *
typid: uint32
strmem_flags: int
def first_named_type(*args) ‑> char const *
first_named_type(ti, ntf_flags) -> char const *
Enumerate types.
ti: (C++: const til_t *) type library. nullptr means the local type library for the current
database.
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(*args) ‑> int
for_all_arglocs(vv, vloc, size, off=0) -> int
Compress larger argloc types and initiate the aloc visitor.
vv: (C++: aloc_visitor_t &)
vloc: (C++: argloc_t &)
size: (C++: int)
off: (C++: int)
def for_all_const_arglocs(*args) ‑> int
for_all_const_arglocs(vv, vloc, size, off=0) -> int
See for_all_arglocs()
vv: (C++: const_aloc_visitor_t &)
vloc: (C++: const argloc_t &) argloc_t const &
size: (C++: int)
off: (C++: int)
def free_til(*args) ‑> void
free_til(ti)
Free memory allocated by til.
ti: (C++: til_t *)
def func_has_stkframe_hole(*args) ‑> bool
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.
ea: (C++: ea_t)
fti: (C++: const func_type_data_t &) func_type_data_t const &
def gcc_layout(*args) ‑> bool
gcc_layout() -> bool
Should use the struct/union layout as done by gcc?
def gen_decorate_name(*args) ‑> qstring *
gen_decorate_name(name, mangle, cc, type) -> str
Generic function for decorate_name() (may be used in IDP modules)
name: (C++: const char *) char const *
mangle: (C++: bool)
cc: (C++: cm_t)
type: (C++: const tinfo_t *) tinfo_t const *
def gen_use_arg_tinfos(*args) ‑> void
gen_use_arg_tinfos(caller, fti, rargs, set_optype, is_stkarg_load, has_delay_slot)
caller: ea_t
fti: func_type_data_t *
rargs: funcargvec_t *
set_optype: set_op_tinfo_t *
is_stkarg_load: is_stkarg_load_t *
has_delay_slot: has_delay_slot_t *
def gen_use_arg_tinfos2(*args) ‑> void
gen_use_arg_tinfos2(_this, caller, fti, rargs)
Do not call this function directly, use argtinfo_helper_t.
_this: (C++: struct argtinfo_helper_t *) argtinfo_helper_t *
caller: (C++: ea_t)
fti: (C++: func_type_data_t *)
rargs: (C++: funcargvec_t *)
def get_abi_name(*args) ‑> qstring *
get_abi_name() -> str
Get ABI name.
return: length of the name (>=0)
def get_alias_target(*args) ‑> 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.
ti: (C++: const til_t *) til_t const *
ordinal: (C++: uint32)
def get_arg_addrs(*args) ‑> PyObject *
get_arg_addrs(caller) -> PyObject *
Retrieve addresses of argument initialization instructions
caller: the address of the call instruction
return: list of instruction addresses
def get_base_type(*args) ‑> type_t
get_base_type(t) -> type_t
Get get basic type bits (TYPE_BASE_MASK)
t: (C++: type_t)
def get_c_header_path(*args) ‑> qstring *
get_c_header_path() -> str
Get the include directory path of the target compiler.
def get_c_macros(*args) ‑> qstring *
get_c_macros() -> str
Get predefined macros for the target compiler.
def get_comp(*args) ‑> comp_t
get_comp(comp) -> comp_t
Get compiler bits.
comp: (C++: comp_t)
def get_compiler_abbr(*args) ‑> char const *
get_compiler_abbr(id) -> char const *
Get abbreviated compiler name.
id: (C++: comp_t)
def get_compiler_name(*args) ‑> char const *
get_compiler_name(id) -> char const *
Get full compiler name.
id: (C++: comp_t)
def get_compilers(*args) ‑> void
get_compilers(ids, names, abbrs)
Get names of all built-in compilers.
ids: (C++: compvec_t *)
names: (C++: qstrvec_t *)
abbrs: (C++: qstrvec_t *)
def get_enum_member_expr(*args) ‑> qstring *
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.
tif: (C++: const tinfo_t &) enumeration type
serial: (C++: int) which enumeration member to use (0 means the first with the given
value)
value: (C++: uint64) value to search in the enumeration type
return: success
def get_full_type(*args) ‑> type_t
get_full_type(t) -> type_t
Get basic type bits + type flags (TYPE_FULL_MASK)
t: (C++: type_t)
def get_idainfo64_by_type(*args) ‑> size_t *, opinfo_t *, size_t *
get_idainfo64_by_type(out_flags, tif) -> bool
Extract information from a tinfo_t.
out_flags: (C++: flags64_t *) description of type using flags64_t
tif: (C++: const tinfo_t &) the type to inspect
def get_idainfo_by_type(*args) ‑> size_t *, flags_t *, opinfo_t *, size_t *
get_idainfo_by_type(tif) -> bool
Extract information from a tinfo_t.
tif: (C++: const tinfo_t &) the type to inspect
def get_idati(*args) ‑> til_t *
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 idati when is nullptr provided.
def get_named_type(*args) ‑> PyObject *
get_named_type(til, name, ntf_flags) -> (int, bytes, bytes, NoneType, NoneType, int, int)
Get a type data by its name.
til: the type library
name: the type name
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(*args) ‑> PyObject *
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.
til: til_t const *
name: (C++: const char *) char const *
ntf_flags: (C++: int)
def get_named_type_tid(*args) ‑> tid_t
get_named_type_tid(name) -> tid_t
Get named local type TID
name: (C++: const char *) type name
return: TID or BADADDR
def get_numbered_type(*args) ‑> PyObject *
get_numbered_type(til, ordinal) -> (bytes, NoneType, NoneType, NoneType, int), (bytes, bytes, NoneType, NoneType, int)
Retrieve a type by its ordinal number.
til: til_t const *
ordinal: (C++: uint32)
def get_numbered_type_name(*args) ‑> char const *
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
ti: (C++: const til_t *) til_t const *
ordinal: (C++: uint32)
def get_ordinal_count(*args) ‑> uint32
get_ordinal_count(ti=None) -> uint32
Get number of allocated ordinals.
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_from_idb_type(*args) ‑> int
get_ordinal_from_idb_type(name, type) -> int
Get ordinal number of an idb type (struct/enum). The 'type' parameter is used only to determine the kind of the type (struct or enum) Use this function to find out the correspondence between idb types and til types
name: (C++: const char *) char const *
type: (C++: const type_t *) type_t const *
def get_ordinal_limit(*args) ‑> uint32
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 )
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_ordinal_qty(*args) ‑> uint32
get_ordinal_qty(ti) -> uint32
ti: til_t const *
def get_scalar_bt(*args) ‑> type_t
get_scalar_bt(size) -> type_t
size: int
def get_stock_tinfo(*args) ‑> bool
get_stock_tinfo(tif, id) -> bool
tif: tinfo_t *
id: enum stock_type_id_t
def get_tid_name(*args) ‑> qstring *
get_tid_name(tid) -> str
Get a type name for the specified TID
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(*args) ‑> uint32
get_tid_ordinal(tid) -> uint32
Get type ordinal number for TID
tid: (C++: tid_t) type/enum constant/udt member TID
return: type ordinal number or 0
def get_tinfo_attr(*args) ‑> bool
get_tinfo_attr(typid, key, bv, all_attrs) -> bool
typid: uint32
key: qstring const &
bv: bytevec_t *
all_attrs: bool
def get_tinfo_attrs(*args) ‑> bool
get_tinfo_attrs(typid, tav, include_ref_attrs) -> bool
typid: uint32
tav: type_attrs_t *
include_ref_attrs: bool
def get_tinfo_by_flags(*args) ‑> bool
get_tinfo_by_flags(out, flags) -> bool
Get tinfo object that corresponds to data flags
out: (C++: tinfo_t *) type info
flags: (C++: flags64_t) simple flags (byte, word, ..., zword)
def get_tinfo_details(*args) ‑> bool
get_tinfo_details(typid, bt2, buf) -> bool
typid: uint32
bt2: type_t
buf: void *
def get_tinfo_details2(*args) ‑> bool
get_tinfo_details2(typid, bt2, buf) -> bool
typid: uint32
bt2: type_t
buf: void *
def get_tinfo_pdata(*args) ‑> size_t
get_tinfo_pdata(outptr, typid, what) -> size_t
outptr: void *
typid: uint32
what: int
def get_tinfo_property(*args) ‑> size_t
get_tinfo_property(typid, gta_prop) -> size_t
typid: uint32
gta_prop: int
def get_tinfo_property4(*args) ‑> size_t
get_tinfo_property4(typid, gta_prop, p1, p2, p3, p4) -> size_t
typid: uint32
gta_prop: int
p1: size_t
p2: size_t
p3: size_t
p4: size_t
def get_tinfo_size(*args) ‑> size_t
get_tinfo_size(p_effalign, typid, gts_code) -> size_t
p_effalign: uint32 *
typid: uint32
gts_code: int
def get_tinfo_tid(*args) ‑> tid_t
get_tinfo_tid(tif, force_tid) -> tid_t
tif: tinfo_t *
force_tid: bool
def get_type_flags(*args) ‑> type_t
get_type_flags(t) -> type_t
Get type flags (TYPE_FLAGS_MASK)
t: (C++: type_t)
def get_type_ordinal(*args) ‑> int32
get_type_ordinal(ti, name) -> int32
Get type ordinal by its name.
ti: (C++: const til_t *) til_t const *
name: (C++: const char *) char const *
def get_udm_by_fullname(*args) ‑> ssize_t
get_udm_by_fullname(udm, fullname) -> ssize_t
Get udt member by full name
udm: (C++: udm_t *) member, can be NULL
fullname: (C++: const char *) udt member name in format <udt name>.<member name>
return: member index into udt_type_data_t or -1
def get_udm_tid(*args) ‑> tid_t
get_udm_tid(udm, udt_name) -> tid_t
udm: udm_t const *
udt_name: char const *
def get_vftable_ea(*args) ‑> ea_t
get_vftable_ea(ordinal) -> ea_t
Get address of a virtual function table.
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(*args) ‑> uint32
get_vftable_ordinal(vftable_ea) -> uint32
Get ordinal number of the virtual function table.
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(*args) ‑> cm_t
guess_func_cc(fti, npurged, cc_flags) -> cm_t
Use func_type_data_t::guess_cc()
fti: (C++: const func_type_data_t &) func_type_data_t const &
npurged: (C++: int)
cc_flags: (C++: int)
def guess_tinfo(*args) ‑> int
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.
out: (C++: tinfo_t *)
id: (C++: tid_t)
return: one of Guess tinfo codes
def idc_get_local_type(*args) ‑> size_t
idc_get_local_type(ordinal, flags) -> str
ordinal: int
flags: int
def idc_get_local_type_name(*args) ‑> size_t
idc_get_local_type_name(ordinal) -> str
ordinal: int
def idc_get_local_type_raw(*args) ‑> PyObject *
idc_get_local_type_raw(ordinal) -> (bytes, bytes)
ordinal: int
def idc_get_type(*args) ‑> size_t
idc_get_type(ea) -> str
ea: ea_t
def idc_get_type_raw(*args) ‑> PyObject *
idc_get_type_raw(ea) -> PyObject *
ea: ea_t
def idc_guess_type(*args) ‑> size_t
idc_guess_type(ea) -> str
ea: ea_t
def idc_parse_decl(*args) ‑> PyObject *
idc_parse_decl(ti, decl, flags) -> (str, bytes, bytes) or None
ti: til_t *
decl: char const *
flags: int
def idc_parse_types(*args) ‑> int
idc_parse_types(input, flags) -> int
input: char const *
flags: int
def idc_print_type(*args) ‑> PyObject *
idc_print_type(type, fields, name, flags) -> str
type: type_t const *
fields: p_list const *
name: char const *
flags: int
def idc_set_local_type(*args) ‑> int
idc_set_local_type(ordinal, dcl, flags) -> int
ordinal: int
dcl: char const *
flags: int
def import_type(*args) ‑> tid_t
import_type(til, idx, name, flags=0) -> tid_t
Copy a named type from til to idb.
til: (C++: const til_t *) type library
idx: (C++: int) the position of the new type in the list of types (structures or
enums). -1 means at the end of the list
name: (C++: const char *) the type name
flags: (C++: int) combination of Import type flags
return: BADNODE on error
def inf_big_arg_align(*args) ‑> bool
inf_big_arg_align() -> bool
inf_big_arg_align(cc) -> bool
cc: cm_t
def inf_huge_arg_align(*args) ‑> bool
inf_huge_arg_align() -> bool
inf_huge_arg_align(cc) -> bool
cc: cm_t
def inf_pack_stkargs(*args) ‑> bool
inf_pack_stkargs() -> bool
inf_pack_stkargs(cc) -> bool
cc: cm_t
def is_autosync(*args) ‑> bool
is_autosync(name, type) -> bool
Is the specified idb type automatically synchronized?
name: (C++: const char *) char const *
type: type_t const *
is_autosync(name, tif) -> bool
name: char const *
tif: tinfo_t const &
def is_code_far(*args) ‑> bool
is_code_far(cm) -> bool
Does the given model specify far code?.
cm: (C++: cm_t)
def is_comp_unsure(*args) ‑> comp_t
is_comp_unsure(comp) -> comp_t
See COMP_UNSURE.
comp: (C++: comp_t)
def is_data_far(*args) ‑> bool
is_data_far(cm) -> bool
Does the given model specify far data?.
cm: (C++: cm_t)
def is_gcc(*args) ‑> bool
is_gcc() -> bool
Is the target compiler COMP_GNU?
def is_gcc32(*args) ‑> bool
is_gcc32() -> bool
Is the target compiler 32 bit gcc?
def is_gcc64(*args) ‑> bool
is_gcc64() -> bool
Is the target compiler 64 bit gcc?
def is_golang_cc(*args) ‑> bool
is_golang_cc(cc) -> bool
GO language calling convention (return value in stack)?
cc: (C++: cm_t)
def is_ordinal_name(*args) ‑> bool
is_ordinal_name(name, ord=None) -> bool
Check if the name is an ordinal name. Ordinal names have the following format: '#' + set_de(ord)
name: (C++: const char *) char const *
ord: (C++: uint32 *)
def is_purging_cc(*args) ‑> bool
is_purging_cc(cm) -> bool
Does the calling convention clean the stack arguments upon return?.
note: this function is valid only for x86 code
cm: (C++: cm_t)
def is_restype_enum(*args) ‑> bool
is_restype_enum(til, type) -> bool
til: til_t const *
type: type_t const *
def is_restype_struct(*args) ‑> bool
is_restype_struct(til, type) -> bool
til: til_t const *
type: type_t const *
def is_restype_struni(*args) ‑> bool
is_restype_struni(til, type) -> bool
til: til_t const *
type: type_t const *
def is_restype_void(*args) ‑> bool
is_restype_void(til, type) -> bool
til: til_t const *
type: type_t const *
def is_sdacl_byte(*args) ‑> bool
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)
t: (C++: type_t)
def is_swift_cc(*args) ‑> bool
is_swift_cc(cc) -> bool
Swift calling convention (arguments and return values in registers)?
cc: (C++: cm_t)
def is_tah_byte(*args) ‑> bool
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)
t: (C++: type_t)
def is_type_arithmetic(*args) ‑> bool
is_type_arithmetic(t) -> bool
Is the type an arithmetic type? (floating or integral)
t: (C++: type_t)
def is_type_array(*args) ‑> bool
is_type_array(t) -> bool
See BT_ARRAY.
t: (C++: type_t)
def is_type_bitfld(*args) ‑> bool
is_type_bitfld(t) -> bool
See BT_BITFIELD.
t: (C++: type_t)
def is_type_bool(*args) ‑> bool
is_type_bool(t) -> bool
See BTF_BOOL.
t: (C++: type_t)
def is_type_char(*args) ‑> bool
is_type_char(t) -> bool
Does the type specify a char value? (signed or unsigned, see Basic type: integer)
t: (C++: type_t)
def is_type_choosable(*args) ‑> bool
is_type_choosable(ti, ordinal) -> bool
Check if a struct/union type is choosable
ti: (C++: const til_t *) type library
ordinal: (C++: uint32) ordinal number of a UDT type
def is_type_complex(*args) ‑> bool
is_type_complex(t) -> bool
See BT_COMPLEX.
t: (C++: type_t)
def is_type_const(*args) ‑> bool
is_type_const(t) -> bool
See BTM_CONST.
t: (C++: type_t)
def is_type_double(*args) ‑> bool
is_type_double(t) -> bool
See BTF_DOUBLE.
t: (C++: type_t)
def is_type_enum(*args) ‑> bool
is_type_enum(t) -> bool
See BTF_ENUM.
t: (C++: type_t)
def is_type_ext_arithmetic(*args) ‑> bool
is_type_ext_arithmetic(t) -> bool
Is the type an extended arithmetic type? (arithmetic or enum)
t: (C++: type_t)
def is_type_ext_integral(*args) ‑> bool
is_type_ext_integral(t) -> bool
Is the type an extended integral type? (integral or enum)
t: (C++: type_t)
def is_type_float(*args) ‑> bool
is_type_float(t) -> bool
See BTF_FLOAT.
t: (C++: type_t)
def is_type_floating(*args) ‑> bool
is_type_floating(t) -> bool
Is the type a floating point type?
t: (C++: type_t)
def is_type_func(*args) ‑> bool
is_type_func(t) -> bool
See BT_FUNC.
t: (C++: type_t)
def is_type_int(*args) ‑> bool
is_type_int(bt) -> bool
Does the type_t specify one of the basic types in Basic type: integer?
bt: (C++: type_t)
def is_type_int128(*args) ‑> bool
is_type_int128(t) -> bool
Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer)
t: (C++: type_t)
def is_type_int16(*args) ‑> bool
is_type_int16(t) -> bool
Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer)
t: (C++: type_t)
def is_type_int32(*args) ‑> bool
is_type_int32(t) -> bool
Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer)
t: (C++: type_t)
def is_type_int64(*args) ‑> bool
is_type_int64(t) -> bool
Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer)
t: (C++: type_t)
def is_type_integral(*args) ‑> bool
is_type_integral(t) -> bool
Is the type an integral type (char/short/int/long/bool)?
t: (C++: type_t)
def is_type_ldouble(*args) ‑> bool
is_type_ldouble(t) -> bool
See BTF_LDOUBLE.
t: (C++: type_t)
def is_type_paf(*args) ‑> bool
is_type_paf(t) -> bool
Is the type a pointer, array, or function type?
t: (C++: type_t)
def is_type_partial(*args) ‑> bool
is_type_partial(t) -> bool
Identifies an unknown or void type with a known size (see Basic type: unknown & void)
t: (C++: type_t)
def is_type_ptr(*args) ‑> bool
is_type_ptr(t) -> bool
See BT_PTR.
t: (C++: type_t)
def is_type_ptr_or_array(*args) ‑> bool
is_type_ptr_or_array(t) -> bool
Is the type a pointer or array type?
t: (C++: type_t)
def is_type_struct(*args) ‑> bool
is_type_struct(t) -> bool
See BTF_STRUCT.
t: (C++: type_t)
def is_type_struni(*args) ‑> bool
is_type_struni(t) -> bool
Is the type a struct or union?
t: (C++: type_t)
def is_type_sue(*args) ‑> bool
is_type_sue(t) -> bool
Is the type a struct/union/enum?
t: (C++: type_t)
def is_type_tbyte(*args) ‑> bool
is_type_tbyte(t) -> bool
See BTF_FLOAT.
t: (C++: type_t)
def is_type_typedef(*args) ‑> bool
is_type_typedef(t) -> bool
See BTF_TYPEDEF.
t: (C++: type_t)
def is_type_uchar(*args) ‑> bool
is_type_uchar(t) -> bool
See BTF_UCHAR.
t: (C++: type_t)
def is_type_uint(*args) ‑> bool
is_type_uint(t) -> bool
See BTF_UINT.
t: (C++: type_t)
def is_type_uint128(*args) ‑> bool
is_type_uint128(t) -> bool
See BTF_UINT128.
t: (C++: type_t)
def is_type_uint16(*args) ‑> bool
is_type_uint16(t) -> bool
See BTF_UINT16.
t: (C++: type_t)
def is_type_uint32(*args) ‑> bool
is_type_uint32(t) -> bool
See BTF_UINT32.
t: (C++: type_t)
def is_type_uint64(*args) ‑> bool
is_type_uint64(t) -> bool
See BTF_UINT64.
t: (C++: type_t)
def is_type_union(*args) ‑> bool
is_type_union(t) -> bool
See BTF_UNION.
t: (C++: type_t)
def is_type_unknown(*args) ‑> bool
is_type_unknown(t) -> bool
See BT_UNKNOWN.
t: (C++: type_t)
def is_type_void(*args) ‑> bool
is_type_void(t) -> bool
See BTF_VOID.
t: (C++: type_t)
def is_type_volatile(*args) ‑> bool
is_type_volatile(t) -> bool
See BTM_VOLATILE.
t: (C++: type_t)
def is_typeid_last(*args) ‑> bool
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)
t: (C++: type_t)
def is_user_cc(*args) ‑> bool
is_user_cc(cm) -> bool
Does the calling convention specify argument locations explicitly?
cm: (C++: cm_t)
def is_vararg_cc(*args) ‑> bool
is_vararg_cc(cm) -> bool
Does the calling convention use ellipsis?
cm: (C++: cm_t)
def lexcompare_tinfo(*args) ‑> int
lexcompare_tinfo(t1, t2, arg3) -> int
t1: uint32
t2: uint32
arg3: int
def load_til(*args) ‑> qstring *
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.
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
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(*args) ‑> qstring *
load_til_header(tildir, name) -> til_t
Get human-readable til description.
tildir: (C++: const char *) char const *
name: (C++: const char *) char const *
def lower_type(*args) ‑> int
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
til: (C++: til_t *)
tif: (C++: tinfo_t *)
name: (C++: const char *) char const *
_helper: (C++: lowertype_helper_t *)
def new_til(*args) ‑> til_t *
new_til(name, desc) -> til_t
Initialize a til.
name: (C++: const char *) char const *
desc: (C++: const char *) char const *
def next_named_type(*args) ‑> char const *
next_named_type(ti, name, ntf_flags) -> char const *
Enumerate types.
ti: (C++: const til_t *) type library. nullptr means the local type library for the current
database.
name: (C++: const char *) the current name. the name that follows this one will be returned.
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(*args) ‑> bool
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
vloc: (C++: argloc_t *)
size: (C++: int)
gaps: (C++: const rangeset_t *) rangeset_t const *
def pack_idcobj_to_bv(*args) ‑> error_t
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
obj: (C++: const idc_value_t *) idc_value_t const *
tif: (C++: const tinfo_t &) tinfo_t const &
bytes: (C++: relobj_t *)
objoff: (C++: void *)
pio_flags: (C++: int)
def pack_idcobj_to_idb(*args) ‑> error_t
pack_idcobj_to_idb(obj, tif, ea, pio_flags=0) -> error_t
Write a typed idc object to the database.
obj: (C++: const idc_value_t *) idc_value_t const *
tif: (C++: const tinfo_t &) tinfo_t const &
ea: (C++: ea_t)
pio_flags: (C++: int)
def pack_object_to_bv(*args) ‑> PyObject *
pack_object_to_bv(py_obj, ti, type, fields, base_ea, pio_flags=0) -> PyObject *
Packs a typed object to a string
py_obj: PyObject *
ti: Type info. 'None' can be passed.
type: type_t const *
fields: fields string (may be empty or None)
base_ea: base ea used to relocate the pointers in the packed object
pio_flags: flags used while unpacking
return: tuple(0, err_code) on failure
tuple(1, packed_buf) on success
def pack_object_to_idb(*args) ‑> PyObject *
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
py_obj: PyObject *
ti: Type info. 'None' can be passed.
type: type_t const *
fields: fields string (may be empty or None)
ea: ea to be used while packing
pio_flags: flags used while unpacking
def parse_decl(*args) ‑> qstring *
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!
out_tif: (C++: tinfo_t *) type info
til: (C++: til_t *) type library to use. may be nullptr
decl: (C++: const char *) C declaration to parse
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(*args) ‑> 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.
til: (C++: til_t *) type library to store the result
input: (C++: const char *) input string or file name (see hti_flags)
printer: (C++: printer_t *) function to output error messages (use msg or nullptr or your
own callback)
hti_flags: (C++: int) combination of Type formatting flags
return: number of errors, 0 means ok.
def print_argloc(*args) ‑> size_t
print_argloc(vloc, size=0, vflags=0) -> str
Convert an argloc to human readable form.
vloc: (C++: const argloc_t &) argloc_t const &
size: (C++: int)
vflags: (C++: int)
def print_decls(*args) ‑> PyObject *
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().
printer: (C++: text_sink_t &) a handler for printing text
til: (C++: til_t *) the type library holding the ordinals
py_ordinals: ordinals of types to export. nullptr means: all ordinals in til
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(*args) ‑> qstring *
print_tinfo(prefix, indent, cmtindent, flags, tif, name, cmt) -> str
prefix: char const *
indent: int
cmtindent: int
flags: int
tif: tinfo_t const *
name: char const *
cmt: char const *
def print_type(*args) ‑> qstring *
print_type(ea, prtype_flags) -> str
Get type declaration for the specified address.
ea: (C++: ea_t) address
prtype_flags: (C++: int) combination of Type printing flags
return: success
def read_tinfo_bitfield_value(*args) ‑> uint64
read_tinfo_bitfield_value(typid, v, bitoff) -> uint64
typid: uint32
v: uint64
bitoff: int
def remove_abi_opts(*args) ‑> bool
remove_abi_opts(abi_opts, user_level=False) -> bool
abi_opts: char const *
user_level: bool
def remove_pointer(*args) ‑> tinfo_t
remove_pointer(tif) -> tinfo_t
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(*args) ‑> PyObject *
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.
tif: (C++: tinfo_t *)
name: char const *
til: (C++: const til_t *) til_t const *
def replace_ordinal_typerefs(*args) ‑> 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.
til: (C++: til_t *) type library to use. may be nullptr.
tif: (C++: tinfo_t *) type to modify (in/out)
retval number: of replaced subtypes, -1 on failure
def resolve_typedef(*args) ‑> type_t const *
resolve_typedef(til, type) -> type_t const *
til: til_t const *
type: type_t const *
def save_tinfo(*args) ‑> tinfo_code_t
save_tinfo(tif, til, ord, name, ntf_flags) -> tinfo_code_t
tif: tinfo_t *
til: til_t *
ord: size_t
name: char const *
ntf_flags: int
def score_tinfo(*args) ‑> uint32
score_tinfo(tif) -> uint32
tif: tinfo_t const *
def serialize_tinfo(*args) ‑> bool
serialize_tinfo(type, fields, fldcmts, tif, sudt_flags) -> bool
type: qtype *
fields: qtype *
fldcmts: qtype *
tif: tinfo_t const *
sudt_flags: int
def set_abi_name(*args) ‑> bool
set_abi_name(abiname, user_level=False) -> bool
Set abi name (see Compiler IDs)
abiname: (C++: const char *) char const *
user_level: (C++: bool)
def set_c_header_path(*args) ‑> void
set_c_header_path(incdir)
Set include directory path the target compiler.
incdir: (C++: const char *) char const *
def set_c_macros(*args) ‑> void
set_c_macros(macros)
Set predefined macros for the target compiler.
macros: (C++: const char *) char const *
def set_compiler(*args) ‑> bool
set_compiler(cc, flags, abiname=None) -> bool
Change current compiler.
cc: (C++: const compiler_info_t &) compiler to switch to
flags: (C++: int) Set compiler flags
abiname: (C++: const char *) ABI name
return: success
def set_compiler_id(*args) ‑> bool
set_compiler_id(id, abiname=None) -> bool
Set the compiler id (see Compiler IDs)
id: (C++: comp_t)
abiname: (C++: const char *) char const *
def set_compiler_string(*args) ‑> bool
set_compiler_string(compstr, user_level) -> bool
compstr: (C++: const char *) - compiler description in form <abbr>:<abiname>
user_level: (C++: bool) - initiated by user if TRUE
return: success
def set_numbered_type(*args) ‑> tinfo_code_t
set_numbered_type(ti, ordinal, ntf_flags, name, type, fields=None, cmt=None, fldcmts=None, sclass=None) -> tinfo_code_t
Store a type in the til. 'name' may be nullptr for anonymous types. To replace the existed type use NTF_REPLACE
ti: (C++: til_t *)
ordinal: (C++: uint32)
ntf_flags: (C++: int)
name: (C++: const char *) char const *
type: (C++: const type_t *) type_t const *
fields: (C++: const p_list *) p_list const *
cmt: (C++: const char *) char const *
fldcmts: (C++: const p_list *) p_list const *
sclass: (C++: const sclass_t *) sclass_t const *
def set_tinfo_attr(*args) ‑> bool
set_tinfo_attr(tif, ta, may_overwrite) -> bool
tif: tinfo_t *
ta: type_attr_t const &
may_overwrite: bool
def set_tinfo_attrs(*args) ‑> bool
set_tinfo_attrs(tif, ta) -> bool
tif: tinfo_t *
ta: type_attrs_t *
def set_tinfo_property(*args) ‑> size_t
set_tinfo_property(tif, sta_prop, x) -> size_t
tif: tinfo_t *
sta_prop: int
x: size_t
def set_tinfo_property4(*args) ‑> size_t
set_tinfo_property4(tif, sta_prop, p1, p2, p3, p4) -> size_t
tif: tinfo_t *
sta_prop: int
p1: size_t
p2: size_t
p3: size_t
p4: size_t
def set_type_alias(*args) ‑> bool
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.
ti: (C++: til_t *)
src_ordinal: (C++: uint32)
dst_ordinal: (C++: uint32)
def set_type_choosable(*args) ‑> void
set_type_choosable(ti, ordinal, value)
Enable/disable 'choosability' flag for a struct/union type
ti: (C++: til_t *) type library
ordinal: (C++: uint32) ordinal number of a UDT type
value: (C++: bool) flag value
def set_vftable_ea(*args) ‑> bool
set_vftable_ea(ordinal, vftable_ea) -> bool
Set the address of a vftable instance for a vftable type.
ordinal: (C++: uint32) ordinal number of the corresponding vftable type.
vftable_ea: (C++: ea_t) address of a virtual function table.
return: success
def store_til(*args) ‑> bool
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().
ti: (C++: til_t *) type library to store
tildir: (C++: const char *) directory where to store the til. nullptr means current
directory.
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 switch_to_golang(*args) ‑> void
switch_to_golang()
switch to GOLANG calling convention (to be used as default CC)
def tinfo_errstr(*args) ‑> char const *
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
code: (C++: tinfo_code_t) enum tinfo_code_t
def tinfo_t_get_stock(*args) ‑> tinfo_t
tinfo_t_get_stock(id) -> tinfo_t
id: enum stock_type_id_t
def udm_t__make_gap(*args) ‑> bool
udm_t__make_gap(_this, byteoff, nbytes) -> bool
_this: udm_t *
byteoff: uval_t
nbytes: uval_t
def udt_type_data_t__find_member(*args) ‑> ssize_t
udt_type_data_t__find_member(_this, udm, strmem_flags) -> ssize_t
_this: udt_type_data_t const *
udm: udm_t *
strmem_flags: int
def udt_type_data_t__get_best_fit_member(*args) ‑> ssize_t
udt_type_data_t__get_best_fit_member(_this, disp) -> ssize_t
_this: udt_type_data_t const *
disp: asize_t
def unpack_idcobj_from_bv(*args) ‑> error_t
unpack_idcobj_from_bv(obj, tif, bytes, pio_flags=0) -> error_t
Read a typed idc object from the byte vector.
obj: (C++: idc_value_t *)
tif: (C++: const tinfo_t &) tinfo_t const &
bytes: (C++: const bytevec_t &) bytevec_t const &
pio_flags: (C++: int)
def unpack_idcobj_from_idb(*args) ‑> error_t
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
obj: (C++: idc_value_t *)
tif: (C++: const tinfo_t &) tinfo_t const &
ea: (C++: ea_t)
off0: (C++: const bytevec_t *) bytevec_t const *
pio_flags: (C++: int)
def unpack_object_from_bv(*args) ‑> PyObject *
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
ti: Type info. 'None' can be passed.
type: type_t const *
fields: fields string (may be empty or None)
bytes: the bytes to unpack
pio_flags: flags used while unpacking
return: - tuple(0, err) on failure
  • tuple(1, obj) on success
def unpack_object_from_idb(*args) ‑> PyObject *
unpack_object_from_idb(ti, type, fields, ea, pio_flags=0) -> PyObject *
ti: til_t *
type: type_t const *
fields: p_list const *
ea: ea_t
pio_flags: int
def use_golang_cc(*args) ‑> bool
use_golang_cc() -> bool
is GOLANG calling convention used by default?
def value_repr_t__from_opinfo(*args) ‑> bool
value_repr_t__from_opinfo(_this, flags, afl, opinfo, ap) -> bool
_this: value_repr_t *
flags: flags64_t
afl: aflags_t
opinfo: opinfo_t const *
ap: array_parameters_t const *
def value_repr_t__print_(*args) ‑> qstring *
value_repr_t__print_(_this, colored) -> str
_this: value_repr_t const *
colored: bool
def verify_argloc(*args) ‑> int
verify_argloc(vloc, size, gaps) -> int
Verify argloc_t.
vloc: (C++: const argloc_t &) argloc to verify
size: (C++: int) total size of the variable
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(*args) ‑> int
verify_tinfo(typid) -> int
typid: uint32
def visit_subtypes(*args) ‑> int
visit_subtypes(visitor, out, tif, name, cmt) -> int
visitor: tinfo_visitor_t *
out: type_mods_t *
tif: tinfo_t const &
name: char const *
cmt: char const *
def write_tinfo_bitfield_value(*args) ‑> uint64
write_tinfo_bitfield_value(typid, dst, v, bitoff) -> uint64
typid: uint32
dst: uint64
v: uint64
bitoff: int

Classes

class aloc_visitor_t (*args)
Proxy of C++ aloc_visitor_t class.
__init__(self) -> aloc_visitor_t
self: PyObject *

Methods

def visit_location(self, *args) ‑> int
visit_location(self, v, off, size) -> int
v: argloc_t &
off: int
size: int
class argloc_t (*args)
Proxy of C++ argloc_t class.
__init__(self) -> argloc_t
__init__(self, r) -> argloc_t
r: argloc_t const &

Subclasses

Methods

def advance(self, *args) ‑> bool
advance(self, delta) -> bool
Move the location to point 'delta' bytes further.
delta: (C++: int)
def align_reg_high(self, *args) ‑> void
align_reg_high(self, size, _slotsize)
Set register offset to align it to the upper part of _SLOTSIZE.
size: (C++: size_t)
_slotsize: (C++: size_t)
def align_stkoff_high(self, *args) ‑> void
align_stkoff_high(self, size, _slotsize)
Set stack offset to align to the upper part of _SLOTSIZE.
size: (C++: size_t)
_slotsize: (C++: size_t)
def atype(self, *args) ‑> argloc_type_t
atype(self) -> argloc_type_t
Get type (Argument location types)
def calc_offset(self, *args) ‑> sval_t
calc_offset(self) -> sval_t
Calculate offset that can be used to compare 2 similar arglocs.
def compare(self, *args) ‑> int
compare(self, r) -> int
r: argloc_t const &
def consume_rrel(self, *args) ‑> void
consume_rrel(self, p)
Set register-relative location - can't be nullptr.
p: (C++: rrel_t *)
def consume_scattered(self, *args) ‑> void
consume_scattered(self, p)
Set distributed argument location.
p: (C++: scattered_aloc_t *) scattered_aloc_t const &
def get_biggest(self, *args) ‑> argloc_t::biggest_t
get_biggest(self) -> argloc_t::biggest_t
Get largest element in internal union.
def get_custom(self, *args) ‑> void *
get_custom(self) -> void *
Get custom argloc info. Use if atype() == ALOC_CUSTOM
def get_ea(self, *args) ‑> ea_t
get_ea(self) -> ea_t
Get the global address. Use when atype() == ALOC_STATIC
def get_reginfo(self, *args) ‑> uint32
get_reginfo(self) -> uint32
Get all register info. Use when atype() == ALOC_REG1 or ALOC_REG2
def get_rrel(self, *args) ‑> rrel_t const &
get_rrel(self) -> rrel_t
Get register-relative info. Use when atype() == ALOC_RREL
def has_reg(self, *args) ‑> bool
has_reg(self) -> bool
TRUE if argloc has a register part.
def has_stkoff(self, *args) ‑> bool
has_stkoff(self) -> bool
TRUE if argloc has a stack part.
def in_stack(self, *args) ‑> bool
in_stack(self) -> bool
TRUE if argloc is in stack entirely.
def is_badloc(self, *args) ‑> bool
is_badloc(self) -> bool
See ALOC_NONE.
def is_custom(self, *args) ‑> bool
is_custom(self) -> bool
See ALOC_CUSTOM.
def is_ea(self, *args) ‑> bool
is_ea(self) -> bool
See ALOC_STATIC.
def is_fragmented(self, *args) ‑> bool
is_fragmented(self) -> bool
is_scattered() || is_reg2()
def is_mixed_scattered(self, *args) ‑> bool
is_mixed_scattered(self) -> bool
mixed scattered: consists of register and stack parts
def is_reg(self, *args) ‑> bool
is_reg(self) -> bool
is_reg1() || is_reg2()
def is_reg1(self, *args) ‑> bool
is_reg1(self) -> bool
See ALOC_REG1.
def is_reg2(self, *args) ‑> bool
is_reg2(self) -> bool
See ALOC_REG2.
def is_rrel(self, *args) ‑> bool
is_rrel(self) -> bool
See ALOC_RREL.
def is_scattered(self, *args) ‑> bool
is_scattered(self) -> bool
See ALOC_DIST.
def is_stkoff(self, *args) ‑> bool
is_stkoff(self) -> bool
See ALOC_STACK.
def reg1(self, *args) ‑> int
reg1(self) -> int
Get the register info. Use when atype() == ALOC_REG1 or ALOC_REG2
def reg2(self, *args) ‑> int
reg2(self) -> int
Get info for the second register. Use when atype() == ALOC_REG2
def regoff(self, *args) ‑> int
regoff(self) -> int
Get offset from the beginning of the register in bytes. Use when atype() == ALOC_REG1
def scattered(self, *args) ‑> scattered_aloc_t const &
scattered(self) -> scattered_aloc_t
Get scattered argument info. Use when atype() == ALOC_DIST
def set_badloc(self, *args) ‑> void
set_badloc(self)
Set to invalid location.
def set_ea(self, *args) ‑> void
set_ea(self, _ea)
Set static ea location.
_ea: (C++: ea_t)
def set_reg1(self, *args) ‑> void
set_reg1(self, reg, off=0)
Set register location.
reg: (C++: int)
off: (C++: int)
def set_reg2(self, *args) ‑> void
set_reg2(self, _reg1, _reg2)
Set secondary register location.
_reg1: (C++: int)
_reg2: (C++: int)
def set_stkoff(self, *args) ‑> void
set_stkoff(self, off)
Set stack offset location.
off: (C++: sval_t)
def stkoff(self, *args) ‑> sval_t
stkoff(self) -> sval_t
Get the stack offset. Use if atype() == ALOC_STACK
def swap(self, *args) ‑> void
swap(self, r)
Assign this == r and r == this.
r: (C++: argloc_t &)
class argpart_t (*args)
Proxy of C++ argpart_t class.
__init__(self, a) -> argpart_t
a: argloc_t const &
__init__(self) -> argpart_t

Ancestors

Instance variables

var off
offset from the beginning of the argument
var size
the number of bytes

Methods

def bad_offset(self, *args) ‑> bool
bad_offset(self) -> bool
Does this argpart have a valid offset?
def bad_size(self, *args) ‑> bool
bad_size(self) -> bool
Does this argpart have a valid size?
def swap(self, *args) ‑> void
swap(self, r)
Assign this = r and r = this.
r: (C++: argpart_t &)

Inherited members

class argpartvec_t (*args)
Proxy of C++ qvector< argpart_t > class.
__init__(self) -> argpartvec_t
__init__(self, x) -> argpartvec_t
x: qvector< argpart_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: argpart_t const &
def at(self, *args) ‑> argpart_t const &
at(self, _idx) -> argpart_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< argpart_t >::const_iterator
begin(self) -> argpart_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< argpart_t >::const_iterator
end(self) -> argpart_t
def erase(self, *args) ‑> qvector< argpart_t >::iterator
erase(self, it) -> argpart_t
it: qvector< argpart_t >::iterator
erase(self, first, last) -> argpart_t
first: qvector< argpart_t >::iterator
last: qvector< argpart_t >::iterator
def extract(self, *args) ‑> argpart_t *
extract(self) -> argpart_t
def find(self, *args) ‑> qvector< argpart_t >::const_iterator
find(self, x) -> argpart_t
x: argpart_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=argpart_t())
x: argpart_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: argpart_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: argpart_t *
len: size_t
def insert(self, *args) ‑> qvector< argpart_t >::iterator
insert(self, it, x) -> argpart_t
it: qvector< argpart_t >::iterator
x: argpart_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> argpart_t &
push_back(self, x)
x: argpart_t const &
push_back(self) -> argpart_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: argpart_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< argpart_t > &
def truncate(self, *args) ‑> void
truncate(self)
class argtinfo_helper_t (*args)
Proxy of C++ argtinfo_helper_t class.
__init__(self) -> argtinfo_helper_t
self: PyObject *

Instance variables

var reserved
reserved

Methods

def has_delay_slot(self, *args) ‑> bool
has_delay_slot(self, arg0) -> bool
The call instruction with a delay slot?.
arg0: ea_t
def is_stkarg_load(self, *args) ‑> bool
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
insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &)
src: (C++: int *)
dst: (C++: int *)
def set_op_tinfo(self, *args) ‑> bool
set_op_tinfo(self, insn, x, tif, name) -> bool
Set the operand type as specified.
insn: (C++: const insn_t &) an ida_ua.insn_t, or an address (C++: const insn_t &)
x: (C++: const op_t &) op_t const &
tif: (C++: const tinfo_t &) tinfo_t const &
name: (C++: const char *) char const *
def use_arg_tinfos(self, *args) ‑> void
use_arg_tinfos(self, caller, fti, rargs)
This function is to be called by the processor module in response to ev_use_arg_types.
caller: (C++: ea_t)
fti: (C++: func_type_data_t *)
rargs: (C++: funcargvec_t *)
class array_type_data_t (*args)
Proxy of C++ array_type_data_t class.
__init__(self, b=0, n=0) -> array_type_data_t
b: size_t
n: size_t

Instance variables

var base
array base
var elem_type
element type
var nelems
number of elements

Methods

def swap(self, *args) ‑> void
swap(self, r)
set this = r and r = this
r: (C++: array_type_data_t &)
class bitfield_type_data_t (*args)
Proxy of C++ bitfield_type_data_t class.
__init__(self, _nbytes=0, _width=0, _is_unsigned=False) -> bitfield_type_data_t
_nbytes: uchar
_width: uchar
_is_unsigned: bool

Instance variables

var is_unsigned
is bitfield unsigned?
var nbytes
enclosing type size (1,2,4,8 bytes)
var width
number of bits

Methods

def compare(self, *args) ‑> int
compare(self, r) -> int
r: bitfield_type_data_t const &
def is_valid_bitfield(self, *args) ‑> bool
is_valid_bitfield(self) -> bool
def swap(self, *args) ‑> void
swap(self, r)
r: bitfield_type_data_t &
class callregs_t (*args)
Proxy of C++ callregs_t class.
__init__(self) -> callregs_t
__init__(self, cc) -> callregs_t
cc: cm_t

Static methods

def regcount(*args) ‑> int
regcount(cc) -> int
Get max number of registers may be used in a function call.
cc: (C++: cm_t)

Instance variables

var fpregs
array of fp registers
var gpregs
array of gp registers
var nregs
max number of registers that can be used in a call
var policy
argument policy

Methods

def by_slots(self, *args) ‑> bool
by_slots(self) -> bool
def init_regs(self, *args) ‑> void
init_regs(self, cc)
Init policy & registers for given CC.
cc: (C++: cm_t)
def reginds(self, *args) ‑> bool
reginds(self, gp_ind, fp_ind, r) -> bool
Get register indexes within GP/FP arrays. (-1 -> is not present in the corresponding array)
gp_ind: (C++: int *)
fp_ind: (C++: int *)
r: (C++: int)
def reset(self, *args) ‑> void
reset(self)
Set policy and registers to invalid values.
def set(self, *args) ‑> void
set(self, _policy, gprs, fprs)
Init policy & registers (arrays are -1-terminated)
_policy: (C++: argreg_policy_t) enum argreg_policy_t
gprs: (C++: const int *) int const *
fprs: (C++: const int *) int const *
def swap(self, *args) ‑> void
swap(self, r)
swap two instances
r: (C++: callregs_t &)
class const_aloc_visitor_t (*args)
Proxy of C++ const_aloc_visitor_t class.
__init__(self) -> const_aloc_visitor_t
self: PyObject *

Methods

def visit_location(self, *args) ‑> int
visit_location(self, v, off, size) -> int
v: argloc_t const &
off: int
size: int
class custom_data_type_info_t (*args)
Proxy of C++ custom_data_type_info_t class.
__init__(self) -> custom_data_type_info_t

Instance variables

var dtid
data type id
var fid
data format ids
class edm_t (*args)
Proxy of C++ edm_t class.
__init__(self) -> edm_t

Instance variables

var cmt
cmt
var name
name
var value
value

Methods

def get_tid(self, *args) ‑> tid_t
get_tid(self) -> tid_t
def swap(self, *args) ‑> void
swap(self, r)
r: edm_t &
class enum_member_t (*args)
Proxy of C++ edm_t class.
__init__(self) -> edm_t

Instance variables

var cmt
cmt
var name
name
var value
value

Methods

def get_tid(self, *args) ‑> tid_t
get_tid(self) -> tid_t
def swap(self, *args) ‑> void
swap(self, r)
r: edm_t &
class edmvec_t (*args)
Proxy of C++ qvector< edm_t > class.
__init__(self) -> edmvec_t
__init__(self, x) -> edmvec_t
x: qvector< edm_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: edm_t const &
def at(self, *args) ‑> edm_t const &
at(self, _idx) -> edm_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< edm_t >::const_iterator
begin(self) -> edm_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< edm_t >::const_iterator
end(self) -> edm_t
def erase(self, *args) ‑> qvector< edm_t >::iterator
erase(self, it) -> edm_t
it: qvector< edm_t >::iterator
erase(self, first, last) -> edm_t
first: qvector< edm_t >::iterator
last: qvector< edm_t >::iterator
def extract(self, *args) ‑> edm_t *
extract(self) -> edm_t
def find(self, *args) ‑> qvector< edm_t >::const_iterator
find(self, x) -> edm_t
x: edm_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=edm_t())
x: edm_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: edm_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: edm_t *
len: size_t
def insert(self, *args) ‑> qvector< edm_t >::iterator
insert(self, it, x) -> edm_t
it: qvector< edm_t >::iterator
x: edm_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> edm_t &
push_back(self, x)
x: edm_t const &
push_back(self) -> edm_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: edm_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< edm_t > &
def truncate(self, *args) ‑> void
truncate(self)
class enum_member_vec_t (*args)
Proxy of C++ qvector< edm_t > class.
__init__(self) -> edmvec_t
__init__(self, x) -> edmvec_t
x: qvector< edm_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: edm_t const &
def at(self, *args) ‑> edm_t const &
at(self, _idx) -> edm_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< edm_t >::const_iterator
begin(self) -> edm_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< edm_t >::const_iterator
end(self) -> edm_t
def erase(self, *args) ‑> qvector< edm_t >::iterator
erase(self, it) -> edm_t
it: qvector< edm_t >::iterator
erase(self, first, last) -> edm_t
first: qvector< edm_t >::iterator
last: qvector< edm_t >::iterator
def extract(self, *args) ‑> edm_t *
extract(self) -> edm_t
def find(self, *args) ‑> qvector< edm_t >::const_iterator
find(self, x) -> edm_t
x: edm_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=edm_t())
x: edm_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: edm_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: edm_t *
len: size_t
def insert(self, *args) ‑> qvector< edm_t >::iterator
insert(self, it, x) -> edm_t
it: qvector< edm_t >::iterator
x: edm_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> edm_t &
push_back(self, x)
x: edm_t const &
push_back(self) -> edm_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: edm_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< edm_t > &
def truncate(self, *args) ‑> void
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
_bte: bte_t

Ancestors

Instance variables

var bte
enum member sizes (shift amount) and style. do not manually set BTE_BITMASK, use
set_enum_is_bitmask()
var group_sizes
if present, specifies bitmask group sizes each non-trivial group starts with a mask member
var taenum_bits
Type attributes for enums

Methods

def add_constant(self, *args) ‑> void
add_constant(self, name, value, cmt=None)
add constant for regular enum
name: (C++: const char *) char const *
value: (C++: uint64)
cmt: (C++: const char *) char const *
def calc_mask(self, *args) ‑> uint64
calc_mask(self) -> uint64
def calc_nbytes(self, *args) ‑> int
calc_nbytes(self) -> int
get the width of enum in bytes
def find_member(self, *args) ‑> ssize_t
find_member(self, name, _from=0, to=size_t(-1)) -> ssize_t find member (constant or bmask) by value
name: char const *
from: (C++: size_t)
to: (C++: size_t)
find_member(self, value, serial, _from=0, to=size_t(-1), vmask=uint64(-1)) -> ssize_t
value: uint64
serial: uchar
from: size_t
to: size_t
vmask: uint64
def get_constant_group(self, *args) ‑> bool
get_constant_group(self, group_start_index, group_size, idx) -> bool
get group parameters for the constant, valid for etimask enum
group_start_index: (C++: size_t *) index of the group mask
group_size: (C++: size_t *) group size (>=1)
idx: (C++: size_t) constant index
return: success
def get_enum_radix(self, *args) ‑> int
get_enum_radix(self) -> int
Get enum constant radix
return: radix or 1 for BTE_CHAR
def has_lzero(self, *args) ‑> bool
has_lzero(self) -> bool
def is_bf(self, *args) ‑> bool
is_bf(self) -> bool
is bitmask or ordinary enum?
def is_bin(self, *args) ‑> bool
is_bin(self) -> bool
def is_char(self, *args) ‑> bool
is_char(self) -> bool
def is_dec(self, *args) ‑> bool
is_dec(self) -> bool
def is_group_mask_at(self, *args) ‑> bool
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
idx: (C++: size_t) index
return: success
def is_hex(self, *args) ‑> bool
is_hex(self) -> bool
def is_number_signed(self, *args) ‑> bool
is_number_signed(self) -> bool
def is_oct(self, *args) ‑> bool
is_oct(self) -> bool
def is_sbin(self, *args) ‑> bool
is_sbin(self) -> bool
def is_shex(self, *args) ‑> bool
is_shex(self) -> bool
def is_soct(self, *args) ‑> bool
is_soct(self) -> bool
def is_udec(self, *args) ‑> bool
is_udec(self) -> bool
def is_valid_group_sizes(self, *args) ‑> bool
is_valid_group_sizes(self) -> bool
is valid group sizes
def set_enum_radix(self, *args) ‑> void
set_enum_radix(self, radix, sign)
Set radix to display constants
radix: (C++: int) radix with the special case 1 to display as character
sign: (C++: bool)
def set_lzero(self, *args) ‑> void
set_lzero(self, on)
on: bool
def set_nbytes(self, *args) ‑> bool
set_nbytes(self, nbytes) -> bool
set enum width (nbytes)
nbytes: (C++: int)
def set_value_repr(self, *args) ‑> tinfo_code_t
set_value_repr(self, repr) -> tinfo_code_t
set enum radix and other representation info
repr: (C++: const value_repr_t &) value display info
def store_64bit_values(self, *args) ‑> bool
store_64bit_values(self) -> bool
def swap(self, *args) ‑> void
swap(self, r)
swap two instances
r: (C++: enum_type_data_t &)

Inherited members

class func_type_data_t (*args)
Proxy of C++ func_type_data_t class.
__init__(self) -> func_type_data_t

Ancestors

Instance variables

var cc
calling convention
var flags
Function type data property bits
var retloc
return location
var rettype
return type
var spoiled
spoiled register information. if spoiled register info is present, it overrides the standard spoil info (eax, edx, ecx for x86)
var stkargs
size of stack arguments (not used in build_func_type)

Methods

def dump(self, *args) ‑> 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)
praloc_bits: (C++: int)
def get_call_method(self, *args) ‑> int
get_call_method(self) -> int
def guess_cc(self, *args) ‑> cm_t
guess_cc(self, purged, cc_flags) -> cm_t
Guess function calling convention use the following info: argument locations and 'stkargs'
purged: (C++: int)
cc_flags: (C++: int)
def is_const(self, *args) ‑> bool
is_const(self) -> bool
def is_ctor(self, *args) ‑> bool
is_ctor(self) -> bool
def is_dtor(self, *args) ‑> bool
is_dtor(self) -> bool
def is_golang_cc(self, *args) ‑> bool
is_golang_cc(self) -> bool
def is_high(self, *args) ‑> bool
is_high(self) -> bool
def is_noret(self, *args) ‑> bool
is_noret(self) -> bool
def is_pure(self, *args) ‑> bool
is_pure(self) -> bool
def is_static(self, *args) ‑> bool
is_static(self) -> bool
def is_swift_cc(self, *args) ‑> bool
is_swift_cc(self) -> bool
def is_vararg_cc(self, *args) ‑> bool
is_vararg_cc(self) -> bool
def is_virtual(self, *args) ‑> bool
is_virtual(self) -> bool
def swap(self, *args) ‑> void
swap(self, r)
r: func_type_data_t &

Inherited members

class funcarg_t (*args)
Proxy of C++ funcarg_t class.
__init__(self) -> funcarg_t

Instance variables

var argloc
argument location
var cmt
argument comment (may be empty)
var flags
Function argument property bits
var name
argument name (may be empty)
var type
argument type
class funcargvec_t (*args)
Proxy of C++ qvector< funcarg_t > class.
__init__(self) -> funcargvec_t
__init__(self, x) -> funcargvec_t
x: qvector< funcarg_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: funcarg_t const &
def at(self, *args) ‑> funcarg_t const &
at(self, _idx) -> funcarg_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< funcarg_t >::const_iterator
begin(self) -> funcarg_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< funcarg_t >::const_iterator
end(self) -> funcarg_t
def erase(self, *args) ‑> qvector< funcarg_t >::iterator
erase(self, it) -> funcarg_t
it: qvector< funcarg_t >::iterator
erase(self, first, last) -> funcarg_t
first: qvector< funcarg_t >::iterator
last: qvector< funcarg_t >::iterator
def extract(self, *args) ‑> funcarg_t *
extract(self) -> funcarg_t
def find(self, *args) ‑> qvector< funcarg_t >::const_iterator
find(self, x) -> funcarg_t
x: funcarg_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=funcarg_t())
x: funcarg_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: funcarg_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: funcarg_t *
len: size_t
def insert(self, *args) ‑> qvector< funcarg_t >::iterator
insert(self, it, x) -> funcarg_t
it: qvector< funcarg_t >::iterator
x: funcarg_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> funcarg_t &
push_back(self, x)
x: funcarg_t const &
push_back(self) -> funcarg_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: funcarg_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< funcarg_t > &
def truncate(self, *args) ‑> void
truncate(self)
class ida_lowertype_helper_t (*args)
Proxy of C++ ida_lowertype_helper_t class.
__init__(self, _tif, _ea, _pb) -> ida_lowertype_helper_t
_tif: tinfo_t const &
_ea: ea_t
_pb: int

Ancestors

Methods

def get_func_purged_bytes(self, *args) ‑> int
get_func_purged_bytes(self, candidate, arg3) -> int
candidate: tinfo_t const &
arg3: func_type_data_t const &

Inherited members

class lowertype_helper_t (*args, **kwargs)
Proxy of C++ lowertype_helper_t class.

Subclasses

Methods

def func_has_stkframe_hole(self, *args) ‑> bool
func_has_stkframe_hole(self, candidate, candidate_data) -> bool
candidate: tinfo_t const &
candidate_data: func_type_data_t const &
def get_func_purged_bytes(self, *args) ‑> int
get_func_purged_bytes(self, candidate, candidate_data) -> int
candidate: tinfo_t const &
candidate_data: func_type_data_t const &
class predicate_t (*args)
Proxy of C++ predicate_t class.
__init__(self) -> predicate_t
self: PyObject *

Methods

def should_display(self, *args) ‑> bool
should_display(self, til, name, type, fields) -> bool
til: til_t const *
name: char const *
type: type_t const *
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
c: tinfo_t
bps: uchar
p: tinfo_t
d: int32

Instance variables

var based_ptr_size
based_ptr_size
var closure
cannot have both closure and based_ptr_size
var delta
Offset from the beginning of the parent struct.
var obj_type
pointed object type
var parent
Parent struct.
var taptr_bits
TAH bits.

Methods

def is_code_ptr(self, *args) ‑> bool
is_code_ptr(self) -> bool
Are we pointing to code?
def is_shifted(self, *args) ‑> bool
is_shifted(self) -> bool
def swap(self, *args) ‑> void
swap(self, r)
Set this = r and r = this.
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
x: qvector< reg_info_t > const &

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: reg_info_t const &
def append(self, *args) ‑> reg_info_t &
push_back(self, x)
x: reg_info_t const &
push_back(self) -> reg_info_t
def at(self, *args) ‑> reg_info_t const &
__getitem__(self, i) -> reg_info_t
i: size_t
def back(self)
def begin(self, *args) ‑> qvector< reg_info_t >::const_iterator
begin(self) -> reg_info_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< reg_info_t >::const_iterator
end(self) -> reg_info_t
def erase(self, *args) ‑> qvector< reg_info_t >::iterator
erase(self, it) -> reg_info_t
it: qvector< reg_info_t >::iterator
erase(self, first, last) -> reg_info_t
first: qvector< reg_info_t >::iterator
last: qvector< reg_info_t >::iterator
def extract(self, *args) ‑> reg_info_t *
extract(self) -> reg_info_t
def find(self, *args) ‑> qvector< reg_info_t >::const_iterator
find(self, x) -> reg_info_t
x: reg_info_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=reg_info_t())
x: reg_info_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: reg_info_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: reg_info_t *
len: size_t
def insert(self, *args) ‑> qvector< reg_info_t >::iterator
insert(self, it, x) -> reg_info_t
it: qvector< reg_info_t >::iterator
x: reg_info_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> reg_info_t &
push_back(self, x)
x: reg_info_t const &
push_back(self) -> reg_info_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: reg_info_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< reg_info_t > &
def truncate(self, *args) ‑> void
truncate(self)
class regobj_t (*args)
Proxy of C++ regobj_t class.
__init__(self) -> regobj_t

Instance variables

var regidx
index into dbg->registers
var relocate
0-plain num, 1-must relocate
var value
value

Methods

def size(self, *args) ‑> size_t
size(self) -> size_t
class regobjs_t (*args)
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
x: qvector< regobj_t > const &

Subclasses

Methods

def at(self, *args) ‑> regobj_t const &
at(self, _idx) -> regobj_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< regobj_t >::const_iterator
begin(self) -> regobj_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< regobj_t >::const_iterator
end(self) -> regobj_t
def erase(self, *args) ‑> qvector< regobj_t >::iterator
erase(self, it) -> regobj_t
it: qvector< regobj_t >::iterator
erase(self, first, last) -> regobj_t
first: qvector< regobj_t >::iterator
last: qvector< regobj_t >::iterator
def extract(self, *args) ‑> regobj_t *
extract(self) -> regobj_t
def front(self)
def grow(self, *args) ‑> void
grow(self, x=regobj_t())
x: regobj_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: regobj_t *
len: size_t
def insert(self, *args) ‑> qvector< regobj_t >::iterator
insert(self, it, x) -> regobj_t
it: qvector< regobj_t >::iterator
x: regobj_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> regobj_t &
push_back(self, x)
x: regobj_t const &
push_back(self) -> regobj_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: regobj_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< regobj_t > &
def truncate(self, *args) ‑> void
truncate(self)
class rrel_t (*args)
Proxy of C++ rrel_t class.
__init__(self) -> rrel_t

Instance variables

var off
displacement from the address pointed by the register
var reg
register index (into ph.reg_names)
class scattered_aloc_t (*args)
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
nm: char const *
sz: uint16
memt: type_t

Instance variables

var memtype
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
name of SIMD type (nullptr-undefined)
var size
SIMD type size in bytes (0-undefined)
var tif
SIMD type (empty-undefined)

Methods

def match_pattern(self, *args) ‑> bool
match_pattern(self, pattern) -> bool
pattern: simd_info_t const *
class stkarg_area_info_t (*args)
Proxy of C++ stkarg_area_info_t class.
__init__(self) -> stkarg_area_info_t

Instance variables

var cb
cb
var linkage_area
Size of the linkage area. explanations at: fortran-aix/16.1.0?topic=conventions-linkage-area examples: pc: 0, hppa: 0, ppc aix: 0x18 (equal to stkarg_offset)
var shadow_size
Size of the shadow area. explanations at:
in-x64-assembly
examples: x64 Visual Studio C++: 0x20, x64 gcc: 0, ppc aix: 0x20
var stkarg_offset
Offset from the SP to the first stack argument (can include linkage area) examples: pc: 0, hppa: -0x34, ppc aix: 0x18
class text_sink_t (*args)
Proxy of C++ text_sink_t class.
__init__(self) -> text_sink_t
self: PyObject *
class til_symbol_t (*args)
Proxy of C++ til_symbol_t class.
__init__(self, n=None, t=None) -> til_symbol_t
n: char const *
t: til_t const *

Instance variables

var name
symbol name
var til
pointer to til
class til_t (*args)
Proxy of C++ til_t class.
__init__(self) -> til_t

Instance variables

var cc
information about the target compiler
var desc
human readable til description
var flags
Type info library property bits
var name
short file name (without path and extension)
var nbases
number of base tils
var nrefs
number of references to the til
var nstreams
number of extra streams
var streams
symbol stream storage

Methods

def base(self, *args) ‑> til_t *
base(self, n) -> til_t
tils that our til is based on
n: int
def is_dirty(self, *args) ‑> bool
is_dirty(self) -> bool
Has the til been modified? (TIL_MOD)
def set_dirty(self, *args) ‑> void
set_dirty(self)
Mark the til as modified (TIL_MOD)
class tinfo_t (*args)
Proxy of C++ tinfo_t class.
__init__(self) -> tinfo_t
__init__(self, decl_type) -> tinfo_t
decl_type: type_t
__init__(self, r) -> tinfo_t
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(*args) ‑> tinfo_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).
id: (C++: stock_type_id_t) enum stock_type_id_t

Methods

def add_edm(self, *args) ‑> tinfo_code_t
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)
edm: (C++: const edm_t &) the constant name, value, and comment
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_udm(self, *args) ‑> tinfo_code_t
add_udm(self, udm, etf_flags=0, times=1, idx=-1) -> tinfo_code_t
Add a structure/union member.
udm: (C++: const udm_t &) member to add
etf_flags: (C++: uint) edit_type() flags flags
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
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, *args) ‑> bool
append_covered(self, out, offset=0) -> bool
Calculate set of covered bytes for the type
out: (C++: rangeset_t *) pointer to the output buffer. covered bytes will be appended to it.
offset: (C++: uint64) delta in bytes to add to all calculations. used internally during
recurion.
def calc_gaps(self, *args) ‑> bool
calc_gaps(self, out) -> bool
Calculate set of padding bytes for the type
out: (C++: rangeset_t *) pointer to the output buffer; old buffer contents will be lost.
def calc_purged_bytes(self, *args) ‑> int
calc_purged_bytes(self) -> int
def calc_score(self, *args) ‑> uint32
calc_score(self) -> uint32
Calculate the type score (the higher - the nicer is the type)
def calc_udt_aligns(self, *args) ‑> 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
sudt_flags: (C++: int)
def change_sign(self, *args) ‑> bool
change_sign(self, sign) -> bool
Change the type sign. Works only for the types that may have sign.
sign: (C++: type_sign_t)
def clear(self, *args) ‑> void
clear(self)
Clear contents of this tinfo, and remove from the type system.
def clr_const(self, *args) ‑> bool
clr_const(self) -> bool
def clr_const_volatile(self, *args) ‑> bool
clr_const_volatile(self) -> bool
def clr_decl_const_volatile(self, *args) ‑> void
clr_decl_const_volatile(self)
def clr_volatile(self, *args) ‑> bool
clr_volatile(self) -> bool
def compare(self, *args) ‑> int
compare(self, r) -> int
r: tinfo_t const &
def compare_with(self, *args) ‑> bool
compare_with(self, r, tcflags=0) -> bool
Compare two types, based on given flags (see tinfo_t comparison flags)
r: (C++: const tinfo_t &) tinfo_t const &
tcflags: (C++: int)
def convert_array_to_ptr(self, *args) ‑> bool
convert_array_to_ptr(self) -> bool
Convert an array into a pointer. type[] => type *
def copy(self, *args) ‑> tinfo_t
copy(self) -> tinfo_t
def copy_type(self, *args) ‑> tinfo_code_t
copy_type(self, til, name, ntf_flags=0x0001|0x1000) -> tinfo_code_t
til: til_t *
name: char const *
ntf_flags: int
def create_array(self, *args) ‑> bool
create_array(self, p, decl_type=BT_ARRAY) -> bool
p: array_type_data_t const &
decl_type: type_t
create_array(self, tif, nelems=0, base=0, decl_type=BT_ARRAY) -> bool
tif: tinfo_t const &
nelems: uint32
base: uint32
decl_type: type_t
def create_bitfield(self, *args) ‑> bool
create_bitfield(self, p, decl_type=BT_BITFIELD) -> bool
p: bitfield_type_data_t const &
decl_type: type_t
create_bitfield(self, nbytes, width, is_unsigned=False, decl_type=BT_BITFIELD) -> bool
nbytes: uchar
width: uchar
is_unsigned: bool
decl_type: type_t
def create_enum(self, *args) ‑> bool
create_enum(self, p, decl_type=BTF_ENUM) -> bool
p: enum_type_data_t &
decl_type: type_t
def create_forward_decl(self, *args) ‑> tinfo_code_t
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
til: (C++: til_t *)
decl_type: (C++: type_t)
name: (C++: const char *) char const *
ntf_flags: (C++: int)
def create_func(self, *args) ‑> bool
create_func(self, p, decl_type=BT_FUNC) -> bool
p: func_type_data_t &
decl_type: type_t
def create_ptr(self, *args) ‑> bool
create_ptr(self, p, decl_type=BT_PTR) -> bool
p: ptr_type_data_t const &
decl_type: type_t
create_ptr(self, tif, bps=0, decl_type=BT_PTR) -> bool
tif: tinfo_t const &
bps: uchar
decl_type: type_t
def create_simple_type(self, *args) ‑> bool
create_simple_type(self, decl_type) -> bool
decl_type: type_t
def create_typedef(self, *args) ‑> void
create_typedef(self, p, decl_type=BTF_TYPEDEF, try_ordinal=True) -> bool
p: typedef_type_data_t const &
decl_type: type_t
try_ordinal: bool
create_typedef(self, til, name, decl_type=BTF_TYPEDEF, try_ordinal=True)
til: til_t const *
name: char const *
decl_type: type_t
try_ordinal: bool
create_typedef(self, til, ord, decl_type=BTF_TYPEDEF)
til: til_t const *
ord: uint
decl_type: type_t
def create_udt(self, *args) ‑> bool
create_udt(self, p) -> bool
p: udt_type_data_t &
create_udt(self, p, decl_type) -> bool
p: udt_type_data_t &
decl_type: type_t
def del_attr(self, *args) ‑> bool
del_attr(self, key, make_copy=True) -> bool
Del a type attribute. typerefs cannot be modified by this function.
key: (C++: const qstring &) qstring const &
make_copy: (C++: bool)
def del_attrs(self, *args) ‑> void
del_attrs(self)
Del all type attributes. typerefs cannot be modified by this function.
def del_edm(self, *args) ‑> tinfo_code_t
del_edm(self, idx, etf_flags=0) -> tinfo_code_t
idx: size_t
etf_flags: uint
def del_edms(self, *args) ‑> tinfo_code_t
del_edms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t
Delete enum members
idx1: (C++: size_t) index in edmvec_t
idx2: (C++: size_t) index in edmvec_t or size_t(-1)
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_udm(self, *args) ‑> tinfo_code_t
del_udm(self, index, etf_flags=0) -> tinfo_code_t
Delete a structure/union member.
index: (C++: size_t)
etf_flags: (C++: uint)
def del_udms(self, *args) ‑> tinfo_code_t
del_udms(self, idx1, idx2, etf_flags=0) -> tinfo_code_t
Delete structure/union members in the range [idx1, idx2)
idx1: (C++: size_t)
idx2: (C++: size_t)
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.
til: (C++: const til_t *) til_t const *
ptype: (C++: const qtype *) type_t const **
pfields: (C++: const qtype *) p_list const **
pfldcmts: (C++: const qtype *) p_list const **
cmt: (C++: const char *) char const *
deserialize(self, til, type, fields, cmts=None) -> bool
til: til_t const *
type: type_t const *
fields: p_list const *
cmts: p_list const *
def dstr(self, *args) ‑> char const *
dstr(self) -> char const *
Function to facilitate debugging.
def edit_array(self, *args) ‑> tinfo_code_t
edit_array(self, editor, etf_flags=0) -> tinfo_code_t
editor: std::function< tinfo_code_t (array_type_data_t *) > const &
etf_flags: uint
def edit_bitfield(self, *args) ‑> tinfo_code_t
edit_bitfield(self, editor, etf_flags=0) -> tinfo_code_t
editor: std::function< tinfo_code_t (bitfield_type_data_t *) > const &
etf_flags: uint
def edit_edm(self, *args) ‑> tinfo_code_t
edit_edm(self, idx, value, bmask=bmask64_t(-1), etf_flags=0) -> tinfo_code_t Change constant value and/or bitmask
idx: (C++: size_t) index in edmvec_t
value: (C++: uint64) old or new value
bmask: (C++: bmask64_t) old or new bitmask
note: if new bitmask is specified the index of constant may be changed
def edit_enum(self, *args) ‑> tinfo_code_t
edit_enum(self, editor, etf_flags=0) -> tinfo_code_t
editor: std::function< tinfo_code_t (enum_type_data_t *) > const &
etf_flags: uint
def edit_func(self, *args) ‑> tinfo_code_t
edit_func(self, editor, etf_flags=0) -> tinfo_code_t
editor: std::function< tinfo_code_t (func_type_data_t *) > const &
etf_flags: uint
def edit_ptr(self, *args) ‑> tinfo_code_t
edit_ptr(self, editor, etf_flags=0) -> tinfo_code_t
editor: std::function< tinfo_code_t (ptr_type_data_t *) > const &
etf_flags: uint
def edit_udt(self, *args) ‑> tinfo_code_t
edit_udt(self, editor, etf_flags=0) -> tinfo_code_t
Edit udt/enum/func/array/ptr/bitfield. These functions may be used if the desired functionality is not provided by the STA_... based functions.
editor: (C++: const std::function< tinfo_code_t(udt_type_data_t *)> &) callback to modify the type details; should return true on
success
etf_flags: (C++: uint) combination of etf_flag_t constants
def empty(self, *args) ‑> bool
empty(self) -> bool
Was tinfo_t initialized with some type info or not?
def equals_to(self, *args) ‑> bool
equals_to(self, r) -> bool
r: tinfo_t const &
def expand_udt(self, *args) ‑> tinfo_code_t
expand_udt(self, idx, delta, etf_flags=0) -> tinfo_code_t
Expand/shtrink a structure by adding/removing a gap before the specified member.
idx: (C++: size_t) index of the member
delta: (C++: adiff_t) number of bytes to add or remove
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.
def find_edm(self, *args) ‑> tinfo_code_t
find_edm(self, edm, value, bmask=bmask64_t(-1), serial=0) -> tinfo_code_t Find enum member
edm: (C++: edm_t *) enum type member
value: uint64
bmask: bmask64_t
find_edm(self, edm, name) -> tinfo_code_t
edm: edm_t *
name: char const *
def find_udm(self, *args) ‑> int
find_udm(self, udm, strmem_flags) -> int
BTF_STRUCT,BTF_UNION: Find a udt member.
  • at the specified offset (STRMEM_OFFSET)
  • with the specified index (STRMEM_INDEX)
  • with the specified type (STRMEM_TYPE)
  • with the specified name (STRMEM_NAME)
udm: (C++: struct udm_t *) udm_t *
strmem_flags: (C++: int)
return: the index of the found member or -1
def find_udt_member(self, *args) ‑> int
find_udm(self, udm, strmem_flags) -> int
BTF_STRUCT,BTF_UNION: Find a udt member.
  • at the specified offset (STRMEM_OFFSET)
  • with the specified index (STRMEM_INDEX)
  • with the specified type (STRMEM_TYPE)
  • with the specified name (STRMEM_NAME)
udm: (C++: struct udm_t *) udm_t *
strmem_flags: (C++: int)
return: the index of the found member or -1
def force_tid(self, *args) ‑> tid_t
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, *args) ‑> uint32
get_alias_target(self) -> uint32
Get type alias If the type has no alias, return 0.
def get_array_details(self, *args) ‑> bool
get_array_details(self, ai) -> bool
Get the array specific info.
ai: (C++: array_type_data_t *)
def get_array_element(self, *args) ‑> tinfo_t
get_array_element(self) -> tinfo_t
def get_array_nelems(self, *args) ‑> int
get_array_nelems(self) -> int
def get_attr(self, *args) ‑> PyObject *
get_attr(self, key, all_attrs=True) -> str or None
Get a type attribute.
key: (C++: const qstring &) qstring const &
all_attrs: (C++: bool)
def get_attrs(self, *args) ‑> bool
get_attrs(self, tav, all_attrs=False) -> bool
Get type attributes (all_attrs: include attributes of referenced types, if any)
tav: (C++: type_attrs_t *)
all_attrs: (C++: bool)
def get_bit_buckets(self, *args) ‑> bool
get_bit_buckets(self, buckets) -> bool
::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields
buckets: (C++: range64vec_t *)
return: false if wrong type was passed
def get_bitfield_details(self, *args) ‑> bool
get_bitfield_details(self, bi) -> bool
Get the bitfield specific info.
bi: (C++: bitfield_type_data_t *)
def get_declalign(self, *args) ‑> uchar
get_declalign(self) -> uchar
Get declared alignment of the type.
def get_decltype(self, *args) ‑> type_t
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, *args) ‑> tinfo_code_t
get_edm(self, edm, idx) -> tinfo_code_t
Get enum member
edm: (C++: edm_t *) enum type member
idx: (C++: size_t) enum member index
def get_edm_by_tid(self, *args) ‑> ssize_t
get_edm_by_tid(self, edm, tid) -> ssize_t
edm: edm_t *
tid: tid_t
def get_enum_base_type(self, *args) ‑> type_t
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, *args) ‑> bool
get_enum_details(self, ei) -> bool
Get the enum specific info.
ei: (C++: enum_type_data_t *)
def get_enum_radix(self, *args) ‑> 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_final_element(self, *args) ‑> 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, *args) ‑> uint32
get_final_ordinal(self) -> uint32
Get final type ordinal (0 if none)
def get_final_type_name(self, *args) ‑> 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, *args) ‑> type_t
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_func_details(self, *args) ‑> bool
get_func_details(self, fi, gtd=GTD_CALC_ARGLOCS) -> bool
Get only the function specific info for this tinfo_t.
fi: (C++: func_type_data_t *)
gtd: (C++: gtd_func_t) enum gtd_func_t
def get_innermost_udm(self, *args) ‑> tinfo_t
get_innermost_udm(self, bitoffset) -> tinfo_t
Get the innermost member at the given offset
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, *args) ‑> bool
get_methods(self, methods) -> bool
BT_COMPLEX: get a list of member functions declared in this udt.
return: false if no member functions exist
def get_modifiers(self, *args) ‑> type_t
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
Create a tinfo_t object for an existing named type.
til: (C++: const til_t *) type library to use
name: (C++: const char *) name of the type to link to
decl_type: (C++: type_t) if the reference was explicitly specified with the type tag (BTF_STRUCT/BTF_UNION/BTF_ENUM) you may specify it. the kernel will accept only the specified tag after resolving the type. If the resolved type does not correspond to the explicitly specified tag, the type will be considered as undefined
resolve: (C++: bool) true: immediately resolve the type and return success code.
try_ordinal: (C++: bool) true: try to replace name reference by an ordinal reference
def get_nargs(self, *args) ‑> int
get_nargs(self) -> int
BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error)
def get_next_type_name(self, *args) ‑> 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, *args) ‑> 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, *args) ‑> 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())
n: (C++: int)
def get_numbered_type(self, *args) ‑> bool
get_numbered_type(self, til, ordinal, decl_type=BTF_TYPEDEF, resolve=True) -> bool
Create a tinfo_t object for an existing ordinal type.
til: (C++: const til_t *) type library to use
ordinal: (C++: uint32) number of the type to link to
decl_type: (C++: type_t) if the reference was explicitly specified with the type tag
(BTF_STRUCT/BTF_UNION/BTF_ENUM) you may specify it. the kernel will accept only the specified tag after resolving the type. If the resolved type does not correspond to the explicitly specified tag, the type will be considered as undefined
resolve: (C++: bool) true: immediately resolve the type and return success code
def get_onemember_type(self, *args) ‑> tinfo_t
get_onemember_type(self) -> tinfo_t
For objects consisting of one member entirely: return type of the member.
def get_ordinal(self, *args) ‑> uint32
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, *args) ‑> tinfo_t
get_pointed_object(self) -> tinfo_t
def get_ptr_details(self, *args) ‑> bool
get_ptr_details(self, pi) -> bool
Get the pointer info.
pi: (C++: ptr_type_data_t *)
def get_ptrarr_object(self, *args) ‑> 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, *args) ‑> 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, *args) ‑> type_t
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
full: (C++: bool)
def get_rettype(self, *args) ‑> tinfo_t
get_rettype(self) -> tinfo_t
BT_FUNC or BT_PTR BT_FUNC: Get the function's return type
def get_sign(self, *args) ‑> type_sign_t
get_sign(self) -> type_sign_t
Get type sign.
def get_size(self, *args) ‑> size_t
get_size(self, p_effalign=None, gts_code=0) -> size_t
Get the type size in bytes.
p_effalign: (C++: uint32 *) buffer for the alignment value
gts_code: (C++: int) combination of GTS_... constants
return: BADSIZE in case of problems
def get_tid(self, *args) ‑> tid_t
get_tid(self) -> tid_t
Get the type tid Each type in the local type library has a so-called tid associated 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, *args) ‑> til_t *
get_til(self) -> til_t
Get the type library for tinfo_t.
def get_type_by_edm_name(self, *args) ‑> bool
get_type_by_edm_name(self, mname, til=None) -> bool
Retrieve enum tinfo using enum member name
mname: (C++: const char *) enum type member name
til: (C++: til_t *) type library
return: success If the function fails, THIS object becomes empty.
def get_type_by_tid(self, *args) ‑> bool
get_type_by_tid(self, tid) -> bool
tid: tid_t
def get_type_cmt(self, *args) ‑> 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, *args) ‑> 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, *args) ‑> bool
get_type_rptcmt(self) -> bool
Get type comment only if it is repeatable.
def get_udm_by_tid(self, *args) ‑> ssize_t
get_udm_by_tid(self, udm, tid) -> ssize_t
Retrive tinfo using type TID or struct/enum member MID
udm: (C++: udm_t *) [out]: place to save the found member to, may be nullptr
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, *args) ‑> tid_t
get_udm_tid(self, idx) -> tid_t
Get udt member TID
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, *args) ‑> bool
get_udt_details(self, udt, gtd=GTD_CALC_LAYOUT) -> bool
Get the udt specific info.
udt: (C++: udt_type_data_t *)
gtd: (C++: gtd_udt_t) enum gtd_udt_t
def get_udt_nmembers(self, *args) ‑> int
get_udt_nmembers(self) -> int
Get number of udt members. -1-error.
def get_unpadded_size(self, *args) ‑> size_t
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, *args) ‑> bool
has_details(self) -> bool
Does this type refer to a nontrivial type?
def has_union(self, *args) ‑> bool
has_union(self) -> bool
Has a member of type "union"?
def has_vftable(self, *args) ‑> bool
has_vftable(self) -> bool
Has a vftable?
def is_aliased(self, *args) ‑> bool
is_aliased(self) -> bool
def is_anonymous_udt(self, *args) ‑> 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, *args) ‑> bool
is_arithmetic(self) -> bool
is_type_arithmetic(get_realtype())
def is_array(self, *args) ‑> bool
is_array(self) -> bool
is_type_array(get_realtype())
def is_bitfield(self, *args) ‑> bool
is_bitfield(self) -> bool
is_type_bitfld(get_realtype())
def is_bitmask_enum(self, *args) ‑> 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, *args) ‑> bool
is_bool(self) -> bool
is_type_bool(get_realtype())
def is_castable_to(self, *args) ‑> bool
is_castable_to(self, target) -> bool
target: tinfo_t const &
def is_char(self, *args) ‑> bool
is_char(self) -> bool
is_type_char(get_realtype())
def is_complex(self, *args) ‑> bool
is_complex(self) -> bool
is_type_complex(get_realtype())
def is_const(self, *args) ‑> bool
is_const(self) -> bool
is_type_const(get_realtype())
def is_correct(self, *args) ‑> 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, *args) ‑> bool
is_decl_array(self) -> bool
is_type_array(get_decltype())
def is_decl_bitfield(self, *args) ‑> bool
is_decl_bitfield(self) -> bool
is_type_bitfld(get_decltype())
def is_decl_bool(self, *args) ‑> bool
is_decl_bool(self) -> bool
is_type_bool(get_decltype())
def is_decl_char(self, *args) ‑> bool
is_decl_char(self) -> bool
is_type_char(get_decltype())
def is_decl_complex(self, *args) ‑> bool
is_decl_complex(self) -> bool
is_type_complex(get_decltype())
def is_decl_const(self, *args) ‑> bool
is_decl_const(self) -> bool
is_type_const(get_decltype())
def is_decl_double(self, *args) ‑> bool
is_decl_double(self) -> bool
is_type_double(get_decltype())
def is_decl_enum(self, *args) ‑> bool
is_decl_enum(self) -> bool
is_type_enum(get_decltype())
def is_decl_float(self, *args) ‑> bool
is_decl_float(self) -> bool
is_type_float(get_decltype())
def is_decl_floating(self, *args) ‑> bool
is_decl_floating(self) -> bool
is_type_floating(get_decltype())
def is_decl_func(self, *args) ‑> bool
is_decl_func(self) -> bool
is_type_func(get_decltype())
def is_decl_int(self, *args) ‑> bool
is_decl_int(self) -> bool
is_type_int(get_decltype())
def is_decl_int128(self, *args) ‑> bool
is_decl_int128(self) -> bool
is_type_int128(get_decltype())
def is_decl_int16(self, *args) ‑> bool
is_decl_int16(self) -> bool
is_type_int16(get_decltype())
def is_decl_int32(self, *args) ‑> bool
is_decl_int32(self) -> bool
is_type_int32(get_decltype())
def is_decl_int64(self, *args) ‑> bool
is_decl_int64(self) -> bool
is_type_int64(get_decltype())
def is_decl_last(self, *args) ‑> bool
is_decl_last(self) -> bool
is_typeid_last(get_decltype())
def is_decl_ldouble(self, *args) ‑> bool
is_decl_ldouble(self) -> bool
is_type_ldouble(get_decltype())
def is_decl_paf(self, *args) ‑> bool
is_decl_paf(self) -> bool
is_type_paf(get_decltype())
def is_decl_partial(self, *args) ‑> bool
is_decl_partial(self) -> bool
is_type_partial(get_decltype())
def is_decl_ptr(self, *args) ‑> bool
is_decl_ptr(self) -> bool
is_type_ptr(get_decltype())
def is_decl_struct(self, *args) ‑> bool
is_decl_struct(self) -> bool
is_type_struct(get_decltype())
def is_decl_sue(self, *args) ‑> bool
is_decl_sue(self) -> bool
is_type_sue(get_decltype())
def is_decl_tbyte(self, *args) ‑> bool
is_decl_tbyte(self) -> bool
is_type_tbyte(get_decltype())
def is_decl_typedef(self, *args) ‑> bool
is_decl_typedef(self) -> bool
is_type_typedef(get_decltype())
def is_decl_uchar(self, *args) ‑> bool
is_decl_uchar(self) -> bool
is_type_uchar(get_decltype())
def is_decl_udt(self, *args) ‑> bool
is_decl_udt(self) -> bool
is_type_struni(get_decltype())
def is_decl_uint(self, *args) ‑> bool
is_decl_uint(self) -> bool
is_type_uint(get_decltype())
def is_decl_uint128(self, *args) ‑> bool
is_decl_uint128(self) -> bool
is_type_uint128(get_decltype())
def is_decl_uint16(self, *args) ‑> bool
is_decl_uint16(self) -> bool
is_type_uint16(get_decltype())
def is_decl_uint32(self, *args) ‑> bool
is_decl_uint32(self) -> bool
is_type_uint32(get_decltype())
def is_decl_uint64(self, *args) ‑> bool
is_decl_uint64(self) -> bool
is_type_uint64(get_decltype())
def is_decl_union(self, *args) ‑> bool
is_decl_union(self) -> bool
is_type_union(get_decltype())
def is_decl_unknown(self, *args) ‑> bool
is_decl_unknown(self) -> bool
is_type_unknown(get_decltype())
def is_decl_void(self, *args) ‑> bool
is_decl_void(self) -> bool
is_type_void(get_decltype())
def is_decl_volatile(self, *args) ‑> bool
is_decl_volatile(self) -> bool
is_type_volatile(get_decltype())
def is_double(self, *args) ‑> bool
is_double(self) -> bool
is_type_double(get_realtype())
def is_empty_udt(self, *args) ‑> bool
is_empty_udt(self) -> bool
Is an empty struct/union? (has no fields)
def is_enum(self, *args) ‑> bool
is_enum(self) -> bool
is_type_enum(get_realtype())
def is_ext_arithmetic(self, *args) ‑> bool
is_ext_arithmetic(self) -> bool
is_type_ext_arithmetic(get_realtype())
def is_ext_integral(self, *args) ‑> bool
is_ext_integral(self) -> bool
is_type_ext_integral(get_realtype())
def is_float(self, *args) ‑> bool
is_float(self) -> bool
is_type_float(get_realtype())
def is_floating(self, *args) ‑> bool
is_floating(self) -> bool
is_type_floating(get_realtype())
def is_forward_decl(self, *args) ‑> 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, *args) ‑> bool
is_forward_enum(self) -> bool
def is_forward_struct(self, *args) ‑> bool
is_forward_struct(self) -> bool
def is_forward_union(self, *args) ‑> bool
is_forward_union(self) -> bool
def is_from_subtil(self, *args) ‑> 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, *args) ‑> bool
is_func(self) -> bool
is_type_func(get_realtype())
def is_funcptr(self, *args) ‑> bool
is_funcptr(self) -> bool
Is this pointer to a function?
def is_high_func(self, *args) ‑> bool
is_high_func(self) -> bool
def is_int(self, *args) ‑> bool
is_int(self) -> bool
is_type_int(get_realtype())
def is_int128(self, *args) ‑> bool
is_int128(self) -> bool
is_type_int128(get_realtype())
def is_int16(self, *args) ‑> bool
is_int16(self) -> bool
is_type_int16(get_realtype())
def is_int32(self, *args) ‑> bool
is_int32(self) -> bool
is_type_int32(get_realtype())
def is_int64(self, *args) ‑> bool
is_int64(self) -> bool
is_type_int64(get_realtype())
def is_integral(self, *args) ‑> bool
is_integral(self) -> bool
is_type_integral(get_realtype())
def is_ldouble(self, *args) ‑> bool
is_ldouble(self) -> bool
is_type_ldouble(get_realtype())
def is_manually_castable_to(self, *args) ‑> bool
is_manually_castable_to(self, target) -> bool
target: tinfo_t const &
def is_one_fpval(self, *args) ‑> bool
is_one_fpval(self) -> bool
Floating value or an object consisting of one floating member entirely.
def is_paf(self, *args) ‑> bool
is_paf(self) -> bool
is_type_paf(get_realtype())
def is_partial(self, *args) ‑> bool
is_partial(self) -> bool
is_type_partial(get_realtype())
def is_ptr(self, *args) ‑> bool
is_ptr(self) -> bool
is_type_ptr(get_realtype())
def is_ptr_or_array(self, *args) ‑> bool
is_ptr_or_array(self) -> bool
is_type_ptr_or_array(get_realtype())
def is_purging_cc(self, *args) ‑> bool
is_purging_cc(self) -> bool
is_purging_cc(get_cc())
def is_pvoid(self, *args) ‑> bool
is_pvoid(self) -> bool
Is "void *"?. This function does not check the pointer attributes and type modifiers.
def is_scalar(self, *args) ‑> bool
is_scalar(self) -> bool
Does the type represent a single number?
def is_shifted_ptr(self, *args) ‑> bool
is_shifted_ptr(self) -> bool
Is a shifted pointer?
def is_signed(self, *args) ‑> bool
is_signed(self) -> bool
Is this a signed type?
def is_small_udt(self, *args) ‑> bool
is_small_udt(self) -> bool
Is a small udt? (can fit a register or a pair of registers)
def is_sse_type(self, *args) ‑> bool
is_sse_type(self) -> bool
Is a SSE vector type?
def is_struct(self, *args) ‑> bool
is_struct(self) -> bool
is_type_struct(get_realtype())
def is_sue(self, *args) ‑> bool
is_sue(self) -> bool
is_type_sue(get_realtype())
def is_tbyte(self, *args) ‑> bool
is_tbyte(self) -> bool
is_type_tbyte(get_realtype())
def is_typedef(self, *args) ‑> 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, *args) ‑> bool
is_typeref(self) -> bool
Is this type a type reference?.
def is_uchar(self, *args) ‑> bool
is_uchar(self) -> bool
is_type_uchar(get_realtype())
def is_udt(self, *args) ‑> bool
is_udt(self) -> bool
is_type_struni(get_realtype())
def is_uint(self, *args) ‑> bool
is_uint(self) -> bool
is_type_uint(get_realtype())
def is_uint128(self, *args) ‑> bool
is_uint128(self) -> bool
is_type_uint128(get_realtype())
def is_uint16(self, *args) ‑> bool
is_uint16(self) -> bool
is_type_uint16(get_realtype())
def is_uint32(self, *args) ‑> bool
is_uint32(self) -> bool
is_type_uint32(get_realtype())
def is_uint64(self, *args) ‑> bool
is_uint64(self) -> bool
is_type_uint64(get_realtype())
def is_union(self, *args) ‑> bool
is_union(self) -> bool
is_type_union(get_realtype())
def is_unknown(self, *args) ‑> bool
is_unknown(self) -> bool
is_type_unknown(get_realtype())
def is_unsigned(self, *args) ‑> bool
is_unsigned(self) -> bool
Is this an unsigned type?
def is_user_cc(self, *args) ‑> bool
is_user_cc(self) -> bool
is_user_cc(get_cc())
def is_vararg_cc(self, *args) ‑> bool
is_vararg_cc(self) -> bool
is_vararg_cc(get_cc())
def is_varmember(self, *args) ‑> 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, *args) ‑> bool
is_varstruct(self) -> bool
Is a variable-size structure?
def is_vftable(self, *args) ‑> bool
is_vftable(self) -> bool
Is a vftable type?
def is_void(self, *args) ‑> bool
is_void(self) -> bool
is_type_void(get_realtype())
def is_volatile(self, *args) ‑> bool
is_volatile(self) -> bool
is_type_volatile(get_realtype())
def is_well_defined(self, *args) ‑> bool
is_well_defined(self) -> bool
!(empty()) && !(is_decl_partial())
def parse(self, *args) ‑> bool
parse(self, decl, til=None, pt_flags=0) -> bool
Convenience function to parse a string with a type declaration
decl: (C++: const char *) a type declaration
til: (C++: til_t *) type library to use
pt_flags: (C++: int) combination of Type parsing flags bits
def present(self, *args) ‑> bool
present(self) -> bool
Is the type really present? (not a reference to a missing type, for example)
def read_bitfield_value(self, *args) ‑> uint64
read_bitfield_value(self, v, bitoff) -> uint64
v: uint64
bitoff: int
def remove_ptr_or_array(self, *args) ‑> 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, *args) ‑> tinfo_code_t
rename_edm(self, idx, name, etf_flags=0) -> tinfo_code_t
Rename a enum member
idx: (C++: size_t) index in edmvec_t
name: (C++: const char *) new name
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_type(self, *args) ‑> tinfo_code_t
rename_type(self, name, ntf_flags=0) -> tinfo_code_t
Rename a type
name: (C++: const char *) new type name
ntf_flags: (C++: int) Flags for named types
note: The change is saved immediately
def rename_udm(self, *args) ‑> tinfo_code_t
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
index: (C++: size_t)
name: (C++: const char *) char const *
etf_flags: (C++: uint)
def requires_qualifier(self, *args) ‑> bool
requires_qualifier(self, name, offset) -> bool
Requires full qualifier? (name is not unique)
name: (C++: const char *) field name
offset: (C++: uint64) field offset in bits
return: if the name is not unique, returns true
def save_type(self, *args) ‑> tinfo_code_t
save_type(self, ntf_flags=0x0001|0x0004) -> tinfo_code_t
ntf_flags: int
def serialize(self, *args) ‑> PyObject *
serialize(self, sudt_flags=SUDT_FAST|SUDT_TRUNC) -> (bytes, NoneType, NoneType), (bytes, bytes, NoneType)
Serialize tinfo_t object into a type string.
sudt_flags: (C++: int)
def set_attr(self, *args) ‑> bool
set_attr(self, ta, may_overwrite=True) -> bool
Set a type attribute. If necessary, a new typid will be created.
ta: (C++: const type_attr_t &) type_attr_t const &
may_overwrite: (C++: bool)
def set_attrs(self, *args) ‑> 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)
tav: (C++: type_attrs_t *)
return: false: bad attributes
def set_const(self, *args) ‑> void
set_const(self)
def set_declalign(self, *args) ‑> bool
set_declalign(self, declalign) -> bool
declalign: uchar
def set_edm_cmt(self, *args) ‑> tinfo_code_t
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.
idx: (C++: size_t) index in edmvec_t
cmt: (C++: const char *) comment
etf_flags: (C++: uint) etf_flag_t
def set_enum_is_bitmask(self, *args) ‑> tinfo_code_t
set_enum_is_bitmask(self, stance=ENUMBM_ON, etf_flags=0) -> tinfo_code_t
stance: enum tinfo_t::bitmask_cvt_stance_t
etf_flags: uint
def set_enum_repr(self, *args) ‑> tinfo_code_t
set_enum_repr(self, repr, etf_flags=0) -> tinfo_code_t
Set the representation of enum members.
repr: (C++: const value_repr_t &) value_repr_t
etf_flags: (C++: uint) etf_flag_t
def set_enum_sign(self, *args) ‑> tinfo_code_t
set_enum_sign(self, sign, etf_flags=0) -> tinfo_code_t
Set enum sign
sign: (C++: type_sign_t)
etf_flags: (C++: uint) etf_flag_t
def set_enum_width(self, *args) ‑> tinfo_code_t
set_enum_width(self, nbytes, etf_flags=0) -> tinfo_code_t
Set the width of enum base type
nbytes: (C++: int) width of enum base type, allowed values: 0
(unspecified),1,2,4,8,16,32,64
etf_flags: (C++: uint) etf_flag_t
def set_methods(self, *args) ‑> bool
set_methods(self, methods) -> bool
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, *args) ‑> void
set_modifiers(self, mod)
mod: type_t
def set_named_type(self, *args) ‑> tinfo_code_t
set_named_type(self, til, name, ntf_flags=0) -> tinfo_code_t
til: til_t *
name: char const *
ntf_flags: int
def set_numbered_type(self, *args) ‑> tinfo_code_t
set_numbered_type(self, til, ord, ntf_flags=0, name=None) -> tinfo_code_t
til: til_t *
ord: uint32
ntf_flags: int
name: char const *
def set_symbol_type(self, *args) ‑> tinfo_code_t
set_symbol_type(self, til, name, ntf_flags=0) -> tinfo_code_t
til: til_t *
name: char const *
ntf_flags: int
def set_type_alias(self, *args) ‑> bool
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.
dest_ord: (C++: uint32)
def set_type_alignment(self, *args) ‑> tinfo_code_t
set_type_alignment(self, declalign, etf_flags=0) -> tinfo_code_t
Set type alignment.
declalign: (C++: uchar)
etf_flags: (C++: uint)
def set_type_cmt(self, *args) ‑> tinfo_code_t
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
cmt: (C++: const char *) char const *
is_regcmt: (C++: bool)
etf_flags: (C++: uint)
def set_udm_cmt(self, *args) ‑> tinfo_code_t
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.
index: (C++: size_t)
cmt: (C++: const char *) char const *
is_regcmt: (C++: bool)
etf_flags: (C++: uint)
def set_udm_repr(self, *args) ‑> tinfo_code_t
set_udm_repr(self, index, repr, etf_flags=0) -> tinfo_code_t
Set the representation of a structure/union member.
index: (C++: size_t)
repr: (C++: const value_repr_t &) value_repr_t const &
etf_flags: (C++: uint)
def set_udm_type(self, *args) ‑> tinfo_code_t
set_udm_type(self, index, tif, etf_flags=0, repr=None) -> tinfo_code_t
Set type of a structure/union member.
index: (C++: size_t) member index in the udm array
tif: (C++: const tinfo_t &) new type for the member
etf_flags: (C++: uint) etf_flag_t
repr: (C++: const value_repr_t *) new representation for the member (optional)
return: tinfo_code_t
def set_udt_alignment(self, *args) ‑> tinfo_code_t
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 sda because of packing. The type editing functions (they accept etf_flags) may overwrite this attribute.
sda: (C++: int)
etf_flags: (C++: uint)
def set_udt_pack(self, *args) ‑> tinfo_code_t
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.
pack: (C++: int)
etf_flags: (C++: uint)
def set_volatile(self, *args) ‑> void
set_volatile(self)
def swap(self, *args) ‑> void
swap(self, r)
Assign this = r and r = this.
r: (C++: tinfo_t &)
def write_bitfield_value(self, *args) ‑> uint64
write_bitfield_value(self, dst, v, bitoff) -> uint64
dst: uint64
v: uint64
bitoff: int
class tinfo_visitor_t (*args)
Proxy of C++ tinfo_visitor_t class.
__init__(self, s=0) -> tinfo_visitor_t
s: int

Instance variables

var state
tinfo visitor states

Methods

def apply_to(self, *args) ‑> int
apply_to(self, tif, out=None, name=None, cmt=None) -> int
Call this function to initiate the traversal.
tif: (C++: const tinfo_t &) tinfo_t const &
out: (C++: type_mods_t *)
name: (C++: const char *) char const *
cmt: (C++: const char *) char const *
def prune_now(self, *args) ‑> void
prune_now(self)
To refuse to visit children of the current type, use this:
def visit_type(self, *args) ‑> int
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.
out: (C++: type_mods_t *)
tif: (C++: const tinfo_t &) tinfo_t const &
name: (C++: const char *) char const *
cmt: (C++: const char *) char const *
class type_attr_t (*args)
Proxy of C++ type_attr_t class.
__init__(self) -> type_attr_t

Instance variables

var key
one symbol keys are reserved to be used by the kernel the ones starting with an underscore are reserved too
var value
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
x: qvector< type_attr_t > const &

Methods

def at(self, *args) ‑> type_attr_t const &
at(self, _idx) -> type_attr_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< type_attr_t >::const_iterator
begin(self) -> type_attr_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< type_attr_t >::const_iterator
end(self) -> type_attr_t
def erase(self, *args) ‑> qvector< type_attr_t >::iterator
erase(self, it) -> type_attr_t
it: qvector< type_attr_t >::iterator
erase(self, first, last) -> type_attr_t
first: qvector< type_attr_t >::iterator
last: qvector< type_attr_t >::iterator
def extract(self, *args) ‑> type_attr_t *
extract(self) -> type_attr_t
def front(self)
def grow(self, *args) ‑> void
grow(self, x=type_attr_t())
x: type_attr_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: type_attr_t *
len: size_t
def insert(self, *args) ‑> qvector< type_attr_t >::iterator
insert(self, it, x) -> type_attr_t
it: qvector< type_attr_t >::iterator
x: type_attr_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> type_attr_t &
push_back(self, x)
x: type_attr_t const &
push_back(self) -> type_attr_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: type_attr_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< type_attr_t > &
def truncate(self, *args) ‑> void
truncate(self)
class type_mods_t (*args)
Proxy of C++ type_mods_t class.
__init__(self) -> type_mods_t

Instance variables

var cmt
comment for current type
var flags
Type modification bits
var name
current type name
var type
current type

Methods

def clear(self, *args) ‑> void
clear(self)
def has_cmt(self, *args) ‑> bool
has_cmt(self) -> bool
def has_info(self, *args) ‑> bool
has_info(self) -> bool
def has_name(self, *args) ‑> bool
has_name(self) -> bool
def has_type(self, *args) ‑> bool
has_type(self) -> bool
def is_rptcmt(self, *args) ‑> bool
is_rptcmt(self) -> bool
def set_new_cmt(self, *args) ‑> void
set_new_cmt(self, c, rptcmt)
c: qstring const &
rptcmt: bool
def set_new_name(self, *args) ‑> void
set_new_name(self, n)
n: qstring const &
def set_new_type(self, *args) ‑> void
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.
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
_til: til_t const *
_name: char const *
_resolve: bool
__init__(self, _til, ord, _resolve=False) -> typedef_type_data_t
_til: til_t const *
ord: uint32
_resolve: bool

Instance variables

var is_ordref
is reference by ordinal?
var name
is_ordref=false: target type name. we do not own this pointer!
var ordinal
is_ordref=true: type ordinal number
var resolve
should resolve immediately?
var til
type library to use when resolving

Methods

def swap(self, *args) ‑> void
swap(self, r)
r: typedef_type_data_t &
class udm_t (*args)
Proxy of C++ udm_t class.
__init__(self) -> udm_t

Instance variables

var cmt
member comment
var effalign
effective field alignment (in bytes)
var fda
field alignment (shift amount)
var name
member name
var offset
member offset in bits
var repr
radix, refinfo, strpath, custom_id, strtype
var size
size in bits
var tafld_bits
TAH bits.
var type
member type

Methods

def begin(self, *args) ‑> uint64
begin(self) -> uint64
def can_be_dtor(self, *args) ‑> bool
can_be_dtor(self) -> bool
def can_rename(self, *args) ‑> bool
can_rename(self) -> bool
def clr_baseclass(self, *args) ‑> void
clr_baseclass(self)
def clr_method(self, *args) ‑> void
clr_method(self)
def clr_unaligned(self, *args) ‑> void
clr_unaligned(self)
def clr_vftable(self, *args) ‑> void
clr_vftable(self)
def clr_virtbase(self, *args) ‑> void
clr_virtbase(self)
def end(self, *args) ‑> uint64
end(self) -> uint64
def get_tid(self, *args) ‑> tid_t
get_tid(self, udt_name) -> tid_t
udt_name: char const *
get_tid(self, parent_udt_tid) -> tid_t
parent_udt_tid: tid_t
def is_anonymous_udm(self, *args) ‑> bool
is_anonymous_udm(self) -> bool
def is_baseclass(self, *args) ‑> bool
is_baseclass(self) -> bool
def is_bitfield(self, *args) ‑> bool
is_bitfield(self) -> bool
def is_gap(self, *args) ‑> bool
is_gap(self) -> bool
def is_method(self, *args) ‑> bool
is_method(self) -> bool
def is_regcmt(self, *args) ‑> bool
is_regcmt(self) -> bool
def is_unaligned(self, *args) ‑> bool
is_unaligned(self) -> bool
def is_vftable(self, *args) ‑> bool
is_vftable(self) -> bool
def is_virtbase(self, *args) ‑> bool
is_virtbase(self) -> bool
def is_zero_bitfield(self, *args) ‑> bool
is_zero_bitfield(self) -> bool
def make_gap(self, *args) ‑> bool
make_gap(self, byteoff, nbytes) -> bool
byteoff: uval_t
nbytes: uval_t
def set_baseclass(self, *args) ‑> void
set_baseclass(self, on=True)
on: bool
def set_method(self, *args) ‑> void
set_method(self, on=True)
on: bool
def set_regcmt(self, *args) ‑> void
set_regcmt(self, on=True)
on: bool
def set_unaligned(self, *args) ‑> void
set_unaligned(self, on=True)
on: bool
def set_value_repr(self, *args) ‑> void
set_value_repr(self, r)
r: value_repr_t const &
def set_vftable(self, *args) ‑> void
set_vftable(self, on=True)
on: bool
def set_virtbase(self, *args) ‑> void
set_virtbase(self, on=True)
on: bool
def swap(self, *args) ‑> void
swap(self, r)
r: udm_t &
class udt_member_t (*args)
Proxy of C++ udm_t class.
__init__(self) -> udm_t

Instance variables

var cmt
member comment
var effalign
effective field alignment (in bytes)
var fda
field alignment (shift amount)
var name
member name
var offset
member offset in bits
var repr
radix, refinfo, strpath, custom_id, strtype
var size
size in bits
var tafld_bits
TAH bits.
var type
member type

Methods

def begin(self, *args) ‑> uint64
begin(self) -> uint64
def can_be_dtor(self, *args) ‑> bool
can_be_dtor(self) -> bool
def can_rename(self, *args) ‑> bool
can_rename(self) -> bool
def clr_baseclass(self, *args) ‑> void
clr_baseclass(self)
def clr_method(self, *args) ‑> void
clr_method(self)
def clr_unaligned(self, *args) ‑> void
clr_unaligned(self)
def clr_vftable(self, *args) ‑> void
clr_vftable(self)
def clr_virtbase(self, *args) ‑> void
clr_virtbase(self)
def end(self, *args) ‑> uint64
end(self) -> uint64
def get_tid(self, *args) ‑> tid_t
get_tid(self, udt_name) -> tid_t
udt_name: char const *
get_tid(self, parent_udt_tid) -> tid_t
parent_udt_tid: tid_t
def is_anonymous_udm(self, *args) ‑> bool
is_anonymous_udm(self) -> bool
def is_baseclass(self, *args) ‑> bool
is_baseclass(self) -> bool
def is_bitfield(self, *args) ‑> bool
is_bitfield(self) -> bool
def is_gap(self, *args) ‑> bool
is_gap(self) -> bool
def is_method(self, *args) ‑> bool
is_method(self) -> bool
def is_regcmt(self, *args) ‑> bool
is_regcmt(self) -> bool
def is_unaligned(self, *args) ‑> bool
is_unaligned(self) -> bool
def is_vftable(self, *args) ‑> bool
is_vftable(self) -> bool
def is_virtbase(self, *args) ‑> bool
is_virtbase(self) -> bool
def is_zero_bitfield(self, *args) ‑> bool
is_zero_bitfield(self) -> bool
def make_gap(self, *args) ‑> bool
make_gap(self, byteoff, nbytes) -> bool
byteoff: uval_t
nbytes: uval_t
def set_baseclass(self, *args) ‑> void
set_baseclass(self, on=True)
on: bool
def set_method(self, *args) ‑> void
set_method(self, on=True)
on: bool
def set_regcmt(self, *args) ‑> void
set_regcmt(self, on=True)
on: bool
def set_unaligned(self, *args) ‑> void
set_unaligned(self, on=True)
on: bool
def set_value_repr(self, *args) ‑> void
set_value_repr(self, r)
r: value_repr_t const &
def set_vftable(self, *args) ‑> void
set_vftable(self, on=True)
on: bool
def set_virtbase(self, *args) ‑> void
set_virtbase(self, on=True)
on: bool
def swap(self, *args) ‑> void
swap(self, r)
r: udm_t &
class udt_type_data_t (*args)
Proxy of C++ udt_type_data_t class.
__init__(self) -> udt_type_data_t

Ancestors

Instance variables

var effalign
effective structure alignment (in bytes)
var is_union
is union or struct?
var pack
#pragma pack() alignment (shift amount)
var sda
declared structure alignment (shift amount+1). 0 - unspecified
var taudt_bits
TA... and TAUDT... bits.
var total_size
total structure size in bytes
var unpadded_size
unpadded structure size in bytes
var version
version of udt_type_data_t

Methods

def find_member(self, *args) ‑> ssize_t
find_member(self, pattern_udm, strmem_flags) -> ssize_t
pattern_udm: udm_t *
strmem_flags: int
find_member(self, name) -> ssize_t
name: char const *
find_member(self, bit_offset) -> ssize_t
bit_offset: uint64
def get_best_fit_member(self, *args) ‑> ssize_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).
disp: (C++: asize_t)
def is_cppobj(self, *args) ‑> bool
is_cppobj(self) -> bool
def is_last_baseclass(self, *args) ‑> bool
is_last_baseclass(self, idx) -> bool
idx: size_t
def is_msstruct(self, *args) ‑> bool
is_msstruct(self) -> bool
def is_unaligned(self, *args) ‑> bool
is_unaligned(self) -> bool
def is_vftable(self, *args) ‑> bool
is_vftable(self) -> bool
def set_vftable(self, *args) ‑> void
set_vftable(self, on=True)
on: bool
def swap(self, *args) ‑> void
swap(self, r)
r: udt_type_data_t &

Inherited members

class udtmembervec_t (*args)
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
x: qvector< udm_t > const &

Subclasses

Methods

def add_unique(self, *args) ‑> bool
add_unique(self, x) -> bool
x: udm_t const &
def at(self, *args) ‑> udm_t const &
at(self, _idx) -> udm_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< udm_t >::const_iterator
begin(self) -> udm_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< udm_t >::const_iterator
end(self) -> udm_t
def erase(self, *args) ‑> qvector< udm_t >::iterator
erase(self, it) -> udm_t
it: qvector< udm_t >::iterator
erase(self, first, last) -> udm_t
first: qvector< udm_t >::iterator
last: qvector< udm_t >::iterator
def extract(self, *args) ‑> udm_t *
extract(self) -> udm_t
def find(self, *args) ‑> qvector< udm_t >::const_iterator
find(self, x) -> udm_t
x: udm_t const &
def front(self)
def grow(self, *args) ‑> void
grow(self, x=udm_t())
x: udm_t const &
def has(self, *args) ‑> bool
has(self, x) -> bool
x: udm_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: udm_t *
len: size_t
def insert(self, *args) ‑> qvector< udm_t >::iterator
insert(self, it, x) -> udm_t
it: qvector< udm_t >::iterator
x: udm_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> udm_t &
push_back(self, x)
x: udm_t const &
push_back(self) -> udm_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: udm_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< udm_t > &
def truncate(self, *args) ‑> void
truncate(self)
class valstr_t (*args)
Proxy of C++ valstr_t class.
__init__(self) -> valstr_t

Instance variables

var info
additional info
var length
length if printed on one line
var members
strings for members, each member separately
var oneline
result if printed on one line in UTF-8 encoding
var props
temporary properties, used internally
class valstrs_t (*args)
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
x: qvector< valstr_t > const &

Subclasses

Methods

def at(self, *args) ‑> valstr_t const &
at(self, _idx) -> valstr_t
_idx: size_t
def back(self)
def begin(self, *args) ‑> qvector< valstr_t >::const_iterator
begin(self) -> valstr_t
def capacity(self, *args) ‑> size_t
capacity(self) -> size_t
def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def end(self, *args) ‑> qvector< valstr_t >::const_iterator
end(self) -> valstr_t
def erase(self, *args) ‑> qvector< valstr_t >::iterator
erase(self, it) -> valstr_t
it: qvector< valstr_t >::iterator
erase(self, first, last) -> valstr_t
first: qvector< valstr_t >::iterator
last: qvector< valstr_t >::iterator
def extract(self, *args) ‑> valstr_t *
extract(self) -> valstr_t
def front(self)
def grow(self, *args) ‑> void
grow(self, x=valstr_t())
x: valstr_t const &
def inject(self, *args) ‑> void
inject(self, s, len)
s: valstr_t *
len: size_t
def insert(self, *args) ‑> qvector< valstr_t >::iterator
insert(self, it, x) -> valstr_t
it: qvector< valstr_t >::iterator
x: valstr_t const &
def pop_back(self, *args) ‑> void
pop_back(self)
def push_back(self, *args) ‑> valstr_t &
push_back(self, x)
x: valstr_t const &
push_back(self) -> valstr_t
def qclear(self, *args) ‑> void
qclear(self)
def reserve(self, *args) ‑> void
reserve(self, cnt)
cnt: size_t
def resize(self, *args) ‑> void
resize(self, _newsize, x)
_newsize: size_t
x: valstr_t const &
resize(self, _newsize)
_newsize: size_t
def size(self, *args) ‑> size_t
size(self) -> size_t
def swap(self, *args) ‑> void
swap(self, r)
r: qvector< valstr_t > &
def truncate(self, *args) ‑> void
truncate(self)
class value_repr_t (*args)
Proxy of C++ value_repr_t class.
__init__(self) -> value_repr_t

Instance variables

var ap
FRB_TABFORM, AP_SIGNED is ignored, use FRB_SIGNED instead
var bits
bits
var cd
FRB_CUSTOM.
var delta
FRB_STROFF.
var ri
FRB_OFFSET.
var strtype
FRB_STRLIT.
var type_ordinal
FRB_STROFF, FRB_ENUM.

Methods

def clear(self, *args) ‑> void
clear(self)
def empty(self, *args) ‑> bool
empty(self) -> bool
def from_opinfo(self, *args) ‑> bool
from_opinfo(self, flags, afl, opinfo, _ap) -> bool
flags: flags64_t
afl: aflags_t
opinfo: opinfo_t const *
_ap: array_parameters_t const *
def get_vtype(self, *args) ‑> uint64
get_vtype(self) -> uint64
def has_lzeroes(self, *args) ‑> bool
has_lzeroes(self) -> bool
def has_tabform(self, *args) ‑> bool
has_tabform(self) -> bool
def init_ap(self, *args) ‑> void
init_ap(self, _ap)
_ap: array_parameters_t *
def is_custom(self, *args) ‑> bool
is_custom(self) -> bool
def is_enum(self, *args) ‑> bool
is_enum(self) -> bool
def is_offset(self, *args) ‑> bool
is_offset(self) -> bool
def is_signed(self, *args) ‑> bool
is_signed(self) -> bool
def is_strlit(self, *args) ‑> bool
is_strlit(self) -> bool
def is_stroff(self, *args) ‑> bool
is_stroff(self) -> bool
def is_typref(self, *args) ‑> bool
is_typref(self) -> bool
def parse_value_repr(self, *args) ‑> bool
parse_value_repr(self, attr, target_type=BTF_STRUCT) -> bool
attr: qstring const &
target_type: type_t
def set_ap(self, *args) ‑> void
set_ap(self, _ap)
_ap: array_parameters_t const &
def set_lzeroes(self, *args) ‑> void
set_lzeroes(self, on)
on: bool
def set_signed(self, *args) ‑> void
set_signed(self, on)
on: bool
def set_tabform(self, *args) ‑> void
set_tabform(self, on)
on: bool
def set_vtype(self, *args) ‑> void
set_vtype(self, vt)
vt: uint64
def swap(self, *args) ‑> void
swap(self, r)
r: value_repr_t &