Module ida_typeinf
[frames] | no frames]

Module ida_typeinf

IDA Plugin SDK API wrapper: typeinf

Classes
  funcargvec_t
Proxy of C++ qvector<(funcarg_t)> class
  udtmembervec_t
Proxy of C++ qvector<(udt_member_t)> class
  reginfovec_t
Proxy of C++ qvector<(reg_info_t)> class
  type_attrs_t
Proxy of C++ qvector<(type_attr_t)> class
  type_attr_t
Proxy of C++ type_attr_t class
  til_t
Proxy of C++ til_t class
  rrel_t
Proxy of C++ rrel_t class
  argloc_t
Proxy of C++ argloc_t class
  argpart_t
Proxy of C++ argpart_t class
  scattered_aloc_t
Proxy of C++ scattered_aloc_t class
  aloc_visitor_t
Proxy of C++ aloc_visitor_t class
  const_aloc_visitor_t
Proxy of C++ const_aloc_visitor_t class
  callregs_t
Proxy of C++ callregs_t class
  tinfo_t
Proxy of C++ tinfo_t class
  simd_info_t
Proxy of C++ simd_info_t class
  ptr_type_data_t
Proxy of C++ ptr_type_data_t class
  array_type_data_t
Proxy of C++ array_type_data_t class
  funcarg_t
Proxy of C++ funcarg_t class
  func_type_data_t
Proxy of C++ func_type_data_t class
  enum_member_t
Proxy of C++ enum_member_t class
  enum_type_data_t
Proxy of C++ enum_type_data_t class
  typedef_type_data_t
Proxy of C++ typedef_type_data_t class
  udt_member_t
Proxy of C++ udt_member_t class
  udt_type_data_t
Proxy of C++ udt_type_data_t class
  bitfield_type_data_t
Proxy of C++ bitfield_type_data_t class
  type_mods_t
Proxy of C++ type_mods_t class
  tinfo_visitor_t
Proxy of C++ tinfo_visitor_t class
  regobj_t
Proxy of C++ regobj_t class
  regobjs_t
Proxy of C++ regobjs_t class
  lowertype_helper_t
Proxy of C++ lowertype_helper_t class
  ida_lowertype_helper_t
Proxy of C++ ida_lowertype_helper_t class
  valstr_t
Proxy of C++ valstr_t class
  valstrs_t
Proxy of C++ valstrs_t class
  text_sink_t
Proxy of C++ text_sink_t class
  til_symbol_t
Proxy of C++ til_symbol_t class
  predicate_t
Proxy of C++ predicate_t class
Functions
bool
is_type_const(t)
bool
is_type_volatile(t)
type_t
get_base_type(t)
type_t
get_type_flags(t)
type_t
get_full_type(t)
bool
is_typeid_last(t)
bool
is_type_partial(t)
bool
is_type_void(t)
bool
is_type_unknown(t)
bool
is_type_ptr(t)
bool
is_type_complex(t)
bool
is_type_func(t)
bool
is_type_array(t)
bool
is_type_typedef(t)
bool
is_type_sue(t)
bool
is_type_struct(t)
bool
is_type_union(t)
bool
is_type_struni(t)
bool
is_type_enum(t)
bool
is_type_bitfld(t)
bool
is_type_int(bt)
bool
is_type_int128(t)
bool
is_type_int64(t)
bool
is_type_int32(t)
bool
is_type_int16(t)
bool
is_type_char(t)
bool
is_type_paf(t)
bool
is_type_ptr_or_array(t)
bool
is_type_floating(t)
bool
is_type_integral(t)
bool
is_type_ext_integral(t)
bool
is_type_arithmetic(t)
bool
is_type_ext_arithmetic(t)
bool
is_type_uint(t)
bool
is_type_uchar(t)
bool
is_type_uint16(t)
bool
is_type_uint32(t)
bool
is_type_uint64(t)
bool
is_type_uint128(t)
bool
is_type_ldouble(t)
bool
is_type_double(t)
bool
is_type_float(t)
bool
is_type_bool(t)
bool
is_tah_byte(t)
bool
is_sdacl_byte(t)
bool
append_argloc(out, vloc)
bool
extract_argloc(vloc, ptype, is_retval)
type_t const *
resolve_typedef(til, type)
bool
is_restype_void(til, type)
bool
is_restype_enum(til, type)
bool
is_restype_struni(til, type)
bool
is_restype_struct(til, type)
type_t
get_scalar_bt(size)
til_t
new_til(name, desc)
bool
compact_til(ti)
bool
store_til(ti, tildir, name)
 
free_til(ti)
bool
is_code_far(cm)
bool
is_data_far(cm)
int
verify_argloc(vloc, size, gaps)
bool
optimize_argloc(vloc, size, gaps)
size_t
print_argloc(vloc, size=0, vflags=0)
int
for_all_arglocs(vv, vloc, size, off=0)
int
for_all_const_arglocs(vv, vloc, size, off=0)
bool
is_user_cc(cm)
bool
is_vararg_cc(cm)
bool
is_purging_cc(cm)
int
callregs_t_regcount(cc)
comp_t
get_comp(comp)
char const *
get_compiler_name(id)
char const *
get_compiler_abbr(id)
 
get_compilers(ids, names, abbrs)
comp_t
is_comp_unsure(comp)
comp_t
default_compiler()
bool
is_gcc()
bool
is_gcc32()
bool
is_gcc64()
bool
gcc_layout()
bool
set_compiler(cc, flags, abiname=None)
bool
set_compiler_id(id, abiname=None)
bool
set_abi_name(abiname, user_level=False)
bool
append_abi_opts(abi_opts, user_level=False)
bool
remove_abi_opts(abi_opts, user_level=False)
bool
set_compiler_string(compstr, user_level)
bool
parse_decl(tif, til, decl, flags)
int
convert_pt_flags_to_hti(pt_flags)
int
parse_decls(til, input, printer, hti_flags)
bool
print_type(ea, prtype_flags)
bool
del_named_type(ti, name, ntf_flags)
char const *
first_named_type(ti, ntf_flags)
char const *
next_named_type(ti, name, ntf_flags)
bool
gen_decorate_name(name, mangle, cc, type)
ssize_t
calc_c_cpp_name(name, type, ccn_flags)
uint32
alloc_type_ordinals(ti, qty)
uint32
alloc_type_ordinal(ti)
uint32
get_ordinal_qty(ti)
tinfo_code_t
set_numbered_type(ti, ordinal, ntf_flags, name, type, fields=None, cmt=None, fldcmts=None, sclass=None)
bool
del_numbered_type(ti, ordinal)
bool
set_type_alias(ti, src_ordinal, dst_ordinal)
uint32
get_alias_target(ti, ordinal)
int32
get_type_ordinal(ti, name)
char const *
get_numbered_type_name(ti, ordinal)
ssize_t
create_numbered_type_name(ord)
bool
is_ordinal_name(name, ord=None)
int
get_ordinal_from_idb_type(name, type)
bool
is_autosync(name, type)
is_autosync(name, tif) -> bool
bool
deref_ptr(ptr_ea, tif, closure_obj=None)
tid_t
import_type(til, idx, name, flags=0)
int
add_til(name, flags)
bool
del_til(name)
bool
apply_named_type(ea, name)
bool
apply_tinfo(ea, tif, flags)
bool
apply_cdecl(til, ea, decl, flags=0)
bool
apply_callee_tinfo(caller, tif)
bool
apply_once_tinfo_and_name(dea, tif, name)
int
guess_tinfo(tif, id)
 
set_c_header_path(incdir)
ssize_t
get_c_header_path()
 
set_c_macros(macros)
ssize_t
get_c_macros()
til_t
get_idati()
bool
get_idainfo_by_type(psize, pflags, mt, tif, alsize=None)
 
copy_tinfo_t(_this, r)
 
clear_tinfo_t(_this)
bool
create_tinfo(_this, bt, bt2, ptr)
int
verify_tinfo(typid)
bool
get_tinfo_details(typid, bt2, buf)
size_t
get_tinfo_size(p_effalign, typid, gts_code)
size_t
get_tinfo_pdata(outptr, typid, what)
size_t
get_tinfo_property(typid, gta_prop)
size_t
set_tinfo_property(tif, sta_prop, x)
bool
serialize_tinfo(type, fields, fldcmts, tif, sudt_flags)
bool
deserialize_tinfo(tif, til, ptype, pfields, pfldcmts)
int
find_tinfo_udt_member(udm, typid, strmem_flags)
bool
print_tinfo(prefix, indent, cmtindent, flags, tif, name, cmt)
char const *
dstr_tinfo(tif)
int
visit_subtypes(visitor, out, tif, name, cmt)
bool
compare_tinfo(t1, t2, tcflags)
int
lexcompare_tinfo(t1, t2, arg3)
bool
get_stock_tinfo(tif, id)
uint64
read_tinfo_bitfield_value(typid, v, bitoff)
uint64
write_tinfo_bitfield_value(typid, dst, v, bitoff)
bool
get_tinfo_attr(typid, key, bv, all_attrs)
bool
set_tinfo_attr(tif, ta, may_overwrite)
bool
del_tinfo_attr(tif, key, make_copy)
bool
get_tinfo_attrs(typid, tav, include_ref_attrs)
bool
set_tinfo_attrs(tif, ta)
uint32
score_tinfo(tif)
tinfo_code_t
save_tinfo(tif, til, ord, name, ntf_flags)
bool
append_tinfo_covered(out, typid, offset)
bool
calc_tinfo_gaps(out, typid)
tinfo_t
remove_pointer(tif)
tinfo_t
tinfo_t_get_stock(id)
cm_t
guess_func_cc(fti, npurged, cc_flags)
bool
dump_func_type_data(fti, praloc_bits)
int
compare(a, b)
compare(a, b) -> int compare(a, b) -> int compare(a, b) -> int
error_t
unpack_idcobj_from_idb(obj, tif, ea, off0, pio_flags=0)
error_t
unpack_idcobj_from_bv(obj, tif, bytes, pio_flags=0)
error_t
pack_idcobj_to_idb(obj, tif, ea, pio_flags=0)
error_t
pack_idcobj_to_bv(obj, tif, bytes, objoff, pio_flags=0)
bool
apply_tinfo_to_stkarg(insn, x, v, tif, name)
 
gen_use_arg_tinfos(caller, fti, rargs, set_optype, is_stkarg_load, has_delay_slot)
bool
func_has_stkframe_hole(ea, fti)
int
lower_type(til, tif, name=None, _helper=None)
 
begin_type_updating(utp)
 
end_type_updating(utp)
int
calc_number_of_children(loc, tif, dont_deref_ptr=False)
bool
get_enum_member_expr(tif, serial, value)
bool
choose_named_type(out_sym, root_til, title, ntf_flags, predicate=None)
uint32
choose_local_tinfo(ti, title, func=None, def_ord=0, ud=None)
PyObject *
idc_parse_decl(ti, decl, flags)
PyObject *
calc_type_size(ti, tp)
Returns the size of a type
bool
apply_type(ti, py_type, py_fields, ea, flags)
Apply the specified type to the address
PyObject *
get_arg_addrs(caller)
Retrieve addresses of argument initialization instructions
PyObject *
unpack_object_from_idb(ti, py_type, py_fields, ea, pio_flags=0)
PyObject *
unpack_object_from_bv(ti, py_type, py_fields, py_bytes, pio_flags=0)
Unpacks a buffer into an object.
PyObject *
pack_object_to_idb(py_obj, ti, py_type, py_fields, ea, pio_flags=0)
Write a typed object to the database.
PyObject *
pack_object_to_bv(py_obj, ti, py_type, py_fields, base_ea, pio_flags=0)
Packs a typed object to a string
int
idc_parse_types(input, flags)
PyObject *
idc_get_type_raw(ea)
PyObject *
idc_get_local_type_raw(ordinal)
char *
idc_guess_type(ea)
char *
idc_get_type(ea)
int
idc_set_local_type(ordinal, dcl, flags)
int
idc_get_local_type(ordinal, flags, buf, maxsize)
PyObject *
idc_print_type(py_type, py_fields, name, flags)
char
idc_get_local_type_name(ordinal)
PyObject *
get_named_type(til, name, ntf_flags)
Get a type data by its name.
PyObject *
get_named_type64(til, name, ntf_flags)
int
print_decls(printer, til, py_ordinals, flags)
til_t
load_til(name, tildir)
til_t
load_til_header(tildir, name)
PyObject *
remove_tinfo_pointer(tif, name, til)
PyObject *
get_numbered_type(til, ordinal)
Variables
  RESERVED_BYTE = 255
  TAH_BYTE = 254
  FAH_BYTE = 255
  MAX_DECL_ALIGN = 15
  TAH_HASATTRS = 16
  TAUDT_UNALIGNED = 64
  TAUDT_MSSTRUCT = 32
  TAUDT_CPPOBJ = 128
  TAFLD_BASECLASS = 32
  TAFLD_UNALIGNED = 64
  TAFLD_VIRTBASE = 128
  TAPTR_PTR32 = 32
  TAPTR_PTR64 = 64
  TAPTR_RESTRICT = 96
  TAENUM_64BIT = 32
  TAH_ALL = 240
  cvar = _ida_typeinf.cvar
  TYPE_BASE_MASK = 15
  TYPE_FLAGS_MASK = 48
  TYPE_MODIF_MASK = 192
  TYPE_FULL_MASK = 63
  BT_UNK = 0
  BT_VOID = 1
  BTMT_SIZE0 = 0
  BTMT_SIZE12 = 16
  BTMT_SIZE48 = 32
  BTMT_SIZE128 = 48
  BT_INT8 = 2
  BT_INT16 = 3
  BT_INT32 = 4
  BT_INT64 = 5
  BT_INT128 = 6
  BT_INT = 7
  BTMT_UNKSIGN = 0
  BTMT_SIGNED = 16
  BTMT_USIGNED = 32
  BTMT_UNSIGNED = 32
  BTMT_CHAR = 48
  BT_BOOL = 8
  BTMT_DEFBOOL = 0
  BTMT_BOOL1 = 16
  BTMT_BOOL2 = 32
  BTMT_BOOL8 = 32
  BTMT_BOOL4 = 48
  BT_FLOAT = 9
  BTMT_FLOAT = 0
  BTMT_DOUBLE = 16
  BTMT_LNGDBL = 32
  BTMT_SPECFLT = 48
  BT_PTR = 10
  BTMT_DEFPTR = 0
  BTMT_NEAR = 16
  BTMT_FAR = 32
  BTMT_CLOSURE = 48
  BT_ARRAY = 11
  BTMT_NONBASED = 16
  BTMT_ARRESERV = 32
  BT_FUNC = 12
  BTMT_DEFCALL = 0
  BTMT_NEARCALL = 16
  BTMT_FARCALL = 32
  BTMT_INTCALL = 48
  BT_COMPLEX = 13
  BTMT_STRUCT = 0
  BTMT_UNION = 16
  BTMT_ENUM = 32
  BTMT_TYPEDEF = 48
  BT_BITFIELD = 14
  BTMT_BFLDI8 = 0
  BTMT_BFLDI16 = 16
  BTMT_BFLDI32 = 32
  BTMT_BFLDI64 = 48
  BT_RESERVED = 15
  BTM_CONST = 64
  BTM_VOLATILE = 128
  BTE_SIZE_MASK = 7
  BTE_RESERVED = 8
  BTE_BITFIELD = 16
  BTE_OUT_MASK = 96
  BTE_HEX = 0
  BTE_CHAR = 32
  BTE_SDEC = 64
  BTE_UDEC = 96
  BTE_ALWAYS = 128
  BT_SEGREG = 55
  BT_UNK_BYTE = 17
  BT_UNK_WORD = 16
  BT_UNK_DWORD = 33
  BT_UNK_QWORD = 32
  BT_UNK_OWORD = 49
  BT_UNKNOWN = 48
  BTF_BYTE = 17
  BTF_UNK = 48
  BTF_VOID = 1
  BTF_INT8 = 18
  BTF_CHAR = 50
  BTF_UCHAR = 34
  BTF_UINT8 = 34
  BTF_INT16 = 19
  BTF_UINT16 = 35
  BTF_INT32 = 20
  BTF_UINT32 = 36
  BTF_INT64 = 21
  BTF_UINT64 = 37
  BTF_INT128 = 22
  BTF_UINT128 = 38
  BTF_INT = 7
  BTF_UINT = 39
  BTF_SINT = 23
  BTF_BOOL = 8
  BTF_FLOAT = 9
  BTF_DOUBLE = 25
  BTF_LDOUBLE = 41
  BTF_TBYTE = 57
  BTF_STRUCT = 13
  BTF_UNION = 29
  BTF_ENUM = 45
  BTF_TYPEDEF = 61
  no_sign = 0
  type_signed = 1
  type_unsigned = 2
  TIL_ZIP = 1
  TIL_MAC = 2
  TIL_ESI = 4
  TIL_UNI = 8
  TIL_ORD = 16
  TIL_ALI = 32
  TIL_MOD = 64
  TIL_STM = 128
  TIL_SLD = 256
  TIL_ADD_FAILED = 0
  TIL_ADD_OK = 1
  TIL_ADD_ALREADY = 2
  CM_MASK = 3
  CM_UNKNOWN = 0
  CM_N8_F16 = 1
  CM_N64 = 1
  CM_N16_F32 = 2
  CM_N32_F48 = 3
  CM_M_MASK = 12
  CM_M_NN = 0
  CM_M_FF = 4
  CM_M_NF = 8
  CM_M_FN = 12
  CM_CC_MASK = 240
  CM_CC_INVALID = 0
  CM_CC_UNKNOWN = 16
  CM_CC_VOIDARG = 32
  CM_CC_CDECL = 48
  CM_CC_ELLIPSIS = 64
  CM_CC_STDCALL = 80
  CM_CC_PASCAL = 96
  CM_CC_FASTCALL = 112
  CM_CC_THISCALL = 128
  CM_CC_MANUAL = 144
  CM_CC_SPOILED = 160
  CM_CC_RESERVE4 = 176
  CM_CC_RESERVE3 = 192
  CM_CC_SPECIALE = 208
  CM_CC_SPECIALP = 224
  CM_CC_SPECIAL = 240
  BFA_NORET = 1
  BFA_PURE = 2
  BFA_HIGH = 4
  BFA_STATIC = 8
  BFA_VIRTUAL = 16
  ALOC_NONE = 0
  ALOC_STACK = 1
  ALOC_DIST = 2
  ALOC_REG1 = 3
  ALOC_REG2 = 4
  ALOC_RREL = 5
  ALOC_STATIC = 6
  ALOC_CUSTOM = 7
  PRALOC_VERIFY = 1
  PRALOC_STKOFF = 2
  ARGREGS_POLICY_UNDEFINED = 0
  ARGREGS_GP_ONLY = 1
  ARGREGS_INDEPENDENT = 2
  ARGREGS_BY_SLOTS = 3
  ARGREGS_FP_CONSUME_GP = 4
  C_PC_TINY = 2
  C_PC_SMALL = 2
  C_PC_COMPACT = 10
  C_PC_MEDIUM = 14
  C_PC_LARGE = 6
  C_PC_HUGE = 6
  C_PC_FLAT = 3
  SETCOMP_OVERRIDE = 1
  SETCOMP_ONLY_ID = 2
  SETCOMP_ONLY_ABI = 4
  SETCOMP_BY_USER = 8
  MAX_FUNC_ARGS = 256
  abs_unk = 0
  abs_no = 1
  abs_yes = 2
  sc_unk = 0
  sc_type = 1
  sc_ext = 2
  sc_stat = 3
  sc_reg = 4
  sc_auto = 5
  sc_friend = 6
  sc_virt = 7
  HTI_CPP = 1
  HTI_INT = 2
  HTI_EXT = 4
  HTI_LEX = 8
  HTI_UNP = 16
  HTI_TST = 32
  HTI_FIL = 64
  HTI_MAC = 128
  HTI_NWR = 256
  HTI_NER = 512
  HTI_DCL = 1024
  HTI_NDC = 2048
  HTI_PAK = 28672
  HTI_PAK_SHIFT = 12
  HTI_PAKDEF = 0
  HTI_PAK1 = 4096
  HTI_PAK2 = 8192
  HTI_PAK4 = 12288
  HTI_PAK8 = 16384
  HTI_PAK16 = 20480
  HTI_HIGH = 32768
  HTI_LOWER = 65536
  HTI_RAWARGS = 131072
  PT_SIL = 1
  PT_NDC = 2
  PT_TYP = 4
  PT_VAR = 8
  PT_PACKMASK = 112
  PT_HIGH = 128
  PT_LOWER = 256
  PT_REPLACE = 512
  PT_RAWARGS = 1024
  PRTYPE_1LINE = 0
  PRTYPE_MULTI = 1
  PRTYPE_TYPE = 2
  PRTYPE_PRAGMA = 4
  PRTYPE_SEMI = 8
  PRTYPE_CPP = 16
  PRTYPE_DEF = 32
  PRTYPE_NOARGS = 64
  PRTYPE_NOARRS = 128
  PRTYPE_NORES = 256
  PRTYPE_RESTORE = 512
  NTF_TYPE = 1
  NTF_SYMU = 8
  NTF_SYMM = 0
  NTF_NOBASE = 2
  NTF_REPLACE = 4
  NTF_UMANGLED = 8
  NTF_NOCUR = 32
  NTF_64BIT = 64
  NTF_FIXNAME = 128
  NTF_IDBENC = 256
  TERR_OK = 0
  TERR_SAVE = -1
  TERR_SERIALIZE = -2
  TERR_WRONGNAME = -3
  CCN_C = 0
  CCN_CPP = 1
  IMPTYPE_VERBOSE = 1
  IMPTYPE_OVERRIDE = 2
  IMPTYPE_LOCAL = 4
  ADDTIL_DEFAULT = 0
  ADDTIL_INCOMP = 1
  ADDTIL_SILENT = 2
  ADDTIL_FAILED = 0
  ADDTIL_OK = 1
  ADDTIL_COMP = 2
  TINFO_GUESSED = 0
  TINFO_DEFINITE = 1
  TINFO_DELAYFUNC = 2
  TINFO_STRICT = 4
  GUESS_FUNC_FAILED = 0
  GUESS_FUNC_TRIVIAL = 1
  GUESS_FUNC_OK = 2
  STI_PCHAR = 0
  STI_PUCHAR = 1
  STI_PCCHAR = 2
  STI_PCUCHAR = 3
  STI_PBYTE = 4
  STI_PINT = 5
  STI_PUINT = 6
  STI_PVOID = 7
  STI_PPVOID = 8
  STI_PCVOID = 9
  STI_ACHAR = 10
  STI_AUCHAR = 11
  STI_ACCHAR = 12
  STI_ACUCHAR = 13
  STI_FPURGING = 14
  STI_FDELOP = 15
  STI_MSGSEND = 16
  STI_AEABI_LCMP = 17
  STI_AEABI_ULCMP = 18
  STI_DONT_USE = 19
  STI_LAST = 20
  GTD_CALC_LAYOUT = 0
  GTD_NO_LAYOUT = 128
  GTD_DEL_BITFLDS = 64
  GTD_CALC_ARGLOCS = 0
  GTD_NO_ARGLOCS = 128
  GTS_NESTED = 1
  GTS_BASECLASS = 2
  SUDT_SORT = 1
  SUDT_ALIGN = 2
  SUDT_GAPS = 4
  SUDT_UNEX = 8
  SUDT_FAST = 16
  SUDT_CONST = 64
  SUDT_VOLATILE = 128
  SUDT_TRUNC = 256
  COMP_MASK = 15
  COMP_UNK = 0
  COMP_MS = 1
  COMP_BC = 2
  COMP_WATCOM = 3
  COMP_GNU = 6
  COMP_VISAGE = 7
  COMP_BP = 8
  COMP_UNSURE = 128
  BADSIZE = 18446744073709551615
  BADORD = 4294967295
  FIRST_NONTRIVIAL_TYPID = 256
  TYPID_ISREF = 256
  TYPID_SHIFT = 9
  STRMEM_MASK = 7
  STRMEM_OFFSET = 0
  STRMEM_INDEX = 1
  STRMEM_AUTO = 2
  STRMEM_NAME = 3
  STRMEM_TYPE = 4
  STRMEM_SIZE = 5
  STRMEM_MINS = 6
  STRMEM_MAXS = 7
  STRMEM_ANON = -2147483648
  STRMEM_CASTABLE_TO = 1073741824
  TCMP_EQUAL = 0
  TCMP_IGNMODS = 1
  TCMP_AUTOCAST = 2
  TCMP_MANCAST = 4
  TCMP_CALL = 8
  TCMP_DELPTR = 16
  TCMP_DECL = 32
  FAI_HIDDEN = 1
  FAI_RETPTR = 2
  FAI_STRUCT = 4
  FAI_ARRAY = 8
  TA_ORG_TYPEDEF = '__org_typedef'
  TA_ORG_ARRDIM = '__org_arrdim'
  FTI_SPOILED = 1
  FTI_NORET = 2
  FTI_PURE = 4
  FTI_HIGH = 8
  FTI_STATIC = 16
  FTI_VIRTUAL = 32
  FTI_CALLTYPE = 192
  FTI_DEFCALL = 0
  FTI_NEARCALL = 64
  FTI_FARCALL = 128
  FTI_INTCALL = 192
  FTI_ARGLOCS = 256
  FTI_ALL = 511
  CC_CDECL_OK = 1
  CC_ALLOW_ARGPERM = 2
  CC_ALLOW_REGHOLES = 4
  CC_HAS_ELLIPSIS = 8
  TVIS_TYPE = 1
  TVIS_NAME = 2
  TVIS_CMT = 4
  TVST_PRUNE = 1
  TVST_DEF = 2
  PIO_NOATTR_FAIL = 4
  PIO_IGNORE_PTRS = 8
  UTP_ENUM = 0
  UTP_STRUCT = 1
  VALSTR_OPEN = 1
  PDF_INCL_DEPS = 1
  PDF_DEF_FWD = 2
  PDF_DEF_BASE = 4
  PDF_HEADER_CMT = 8
  PCN_RADIX = 7
  PCN_DEC = 0
  PCN_HEX = 1
  PCN_OCT = 2
  PCN_CHR = 3
  PCN_UNSIGNED = 8
  PCN_LZHEX = 16
  PCN_NEGSIGN = 32
  __package__ = None
Function Details

calc_type_size(ti, tp)

 

Returns the size of a type

Parameters:
  • ti - Type info. 'None' can be passed.
  • tp - type string
Returns: PyObject *
  • None on failure
  • The size of the type

apply_type(ti, py_type, py_fields, ea, flags)

 

Apply the specified type to the address

Parameters:
  • ti - Type info library. 'None' can be used.
  • py_type - type string
  • py_fields - fields string (may be empty or None)
  • ea - the address of the object
  • flags - combination of TINFO_... constants or 0
Returns: bool
Boolean

get_arg_addrs(caller)

 

Retrieve addresses of argument initialization instructions

Parameters:
  • caller - the address of the call instruction
Returns: PyObject *
list of instruction addresses

unpack_object_from_bv(ti, py_type, py_fields, py_bytes, pio_flags=0)

 

Unpacks a buffer into an object. Returns the error_t returned by idaapi.pack_object_to_idb

Parameters:
  • ti - Type info. 'None' can be passed.
  • tp - type string
  • fields - fields string (may be empty or None)
  • bytes - the bytes to unpack
  • pio_flags - flags used while unpacking
Returns: PyObject *
  • tuple(0, err) on failure
  • tuple(1, obj) on success

pack_object_to_idb(py_obj, ti, py_type, py_fields, ea, pio_flags=0)

 

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

Parameters:
  • ti - Type info. 'None' can be passed.
  • tp - type string
  • fields - fields string (may be empty or None)
  • ea - ea to be used while packing
  • pio_flags - flags used while unpacking
Returns: PyObject *

pack_object_to_bv(py_obj, ti, py_type, py_fields, base_ea, pio_flags=0)

 

Packs a typed object to a string

Parameters:
  • ti - Type info. 'None' can be passed.
  • tp - type string
  • 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
Returns: PyObject *
tuple(0, err_code) on failure tuple(1, packed_buf) on success

get_named_type(til, name, ntf_flags)

 

Get a type data by its name.

Parameters:
  • til - the type library
  • name - the type name
  • ntf_flags - a combination of NTF_* constants
Returns: PyObject *
None on failure tuple(code, type_str, fields_str, cmt, field_cmts, sclass, value) on success