Expand description
Raw FFI bindings to IDA’s idalib runtime and the idakit C++ facade.
idakit-sys is the unsafe foundation under idakit, which most users
want instead: it wraps these bindings in a safe, idiomatic API. Reach here directly only to call
a raw symbol the higher layer does not yet expose.
§Surface
The declarations are split into per-domain source modules (runtime, bytes, function_flags,
instruction, bridge_visitors, …) that mirror the facade’s translation units, but every item
is re-exported flat at the crate root, so the public surface is a single namespace
(idakit_sys::guarded_open, idakit_sys::CtreeVisitor), not a module hierarchy. Three kinds
of item live here:
- Raw C bindings:
extern "C"declarations of the facade’s own functions (guarded_open,get_bytes_into, …) sharing the flat namespace with the idalib/IDA symbols they sit beside (open_database,set_name), plus the#[repr(C)]structs and sentinel constants they exchange. cxxbridges: the spec-generated bridge (from theidakit-sys-codegenengine) and its hand-written companions, returning structured values, owning handles asUniquePtr<T>, or driving a walk through an opaque visitor (CtreeVisitor,TypeWalkVisitor).- A typed flag layer: the one deliberate exception to “raw declarations only”. OR-able bit
masks that also cross as FFI fields become
bitflagstypes (SegmentPermissions,FlowFlags,FrameVarFlags,FlowChartFlags,BinSearchFlags), and closed return-code sets become validatednum_enumenums (SigWriteCode,TypeApplyCode); both stay sound at the boundary and spare every caller a hand-rolled bit test. Safe idiomatic wrappers still belong inidakit.
§SDK-name aliases
Every binding carries #[doc(alias)] tags for its IDA SDK spelling, so a rustdoc search
resolves a name like SEGPERM_READ, FC_NOEXT, or open_database to the binding. Aliases
are per crate: idakit_sys carries the raw-binding and SDK names, idakit
carries the idiomatic wrappers.
§Buffer conventions
Functions that accept (*mut c_char, cap: usize) copy the value into the
caller-supplied buffer and NUL-terminate within cap bytes. The return value
is the full source length, which may exceed cap when the output was
truncated. A negative return value means the query failed (missing symbol,
null handle, etc.).
§Owned handles
Opaque owned handles cross as cxx UniquePtr<T> (CompiledBinpat, CFunc, TInfo), freed by
cxx’s deleter on drop. Any handle still passed as a raw *mut c_void is paired with an explicit
dispose call; using one after disposal is undefined behaviour.
§License
MIT. The IDA SDK and runtime are proprietary to Hex-Rays; these bindings link against your own install and redistribute none of it.
Structs§
- BinSearch
Flags bin_searchflag bits frombytes.hpp(IDA 9.3):BIN_SEARCH_CASE/BIN_SEARCH_BITMASK.- Binpat
Stats - The compiled length and anchor count of a pattern, returned by value from
binpat_stats. - Block
Info - One basic block’s bounds and kind, returned by value from
cfg_block. - CFunc
- The SDK’s
cfuncptr_t(qrefcnt_t<cfunc_t>), an opaque decompilation result handled only behind indirection (&CFuncorUniquePtr<CFunc>). - Chunk
Info - One function chunk: its index paired with its address range.
- Compiled
Binpat - A compiled binary-search pattern (
compiled_binpat_vec_t), owned behind aUniquePtrand passed by&to a search. - Ctree
Counts - Statement, expression, and call-site counts of a decompiled function’s ctree, returned by value from
cfunc_counts. - Ctree
Visitor - The
cxxextern "Rust"opaque the C++ ctree walk drives by calling its&mut selfmethods, each forwarding into theCtreeSinkit was built over. - Enum
Const Info - One enum constant, the enum twin of
MemberInfo. - ExprGap
- The ctree extraction-fidelity diagnostic, returned by value from
cfunc_expr_gap. - Flow
Chart - The SDK’s
qflow_chart_t, an opaque control-flow graph handled only behind indirection (&FlowChartorUniquePtr<FlowChart>). - Flow
Chart Flags - Flow-chart build flag bits from
gdl.hpp(FC_NOEXT/FC_CALL_ENDS/FC_NOPREDS), passed toqflow_chart_t::qflow_chart_t. - Flow
Flags InstructionData::flowcontrol-flow bits for a decoded instruction:crate::FLOW_CALL/crate::FLOW_RET/crate::FLOW_JUMP/crate::FLOW_INDIRECT/crate::FLOW_STOPS.- Frame
Var - One stack-frame variable, an owned shared struct returned in a
FrameWalk. - Frame
VarFlags FrameVar::flagsbits marking the reserved return-address and saved-registers slots.- Frame
Walk - A walked stack frame: its total byte size and its variables, returned by
frame_type_walk_visit. - Func
Flags - Function flag bits from
funcs.hpp(func_t::flags). - Import
Rec - One import-table row, returned inside the
imports_buildsnapshot. - Instruction
Data - A decoded instruction, returned by value from
decode_insn;statuscarries the raw result code andopsis right-sized to the populated operands. - LocPiece
- One fragment of a scattered (
ALOC_DIST) local’s location.atypeis the fragment’s ownALOC_*(a register or stack slot);off/sizegive the byte range of the whole value this fragment covers. - Member
Info - One struct/union member, crossed inside a slice for one
fill_structcall.nameis an ownedString: the sink interns members into its own table, so the transient owned copy the walk allocates is copied on anyway. - Name
Flags get_ea_name’sgtn_flagsbits (name.hpp), controlling substitution/demangling.- Operand
Access OperandData::accessbits for a decoded operand:bit0read,bit1written.- Operand
Data - One decoded operand; which fields are meaningful depends on
kind. - RangeT
- A
#[repr(C)]mirror of the SDK’srange_t, crossing the bridge by value as aTrivialExternType. - Register
Data - One register reference in a decoded operand, nested by value in an
OperandData. - Segment
Flags - Segment flag bits from
segment.hpp(SFL_*,segment_t::flags). - Segment
Permissions - Segment permission bits from
segment.hpp(SEGPERM_EXEC/SEGPERM_WRITE/SEGPERM_READ). - SigWrite
Result - The outcome of a signature-surgery call that also reports the function’s parameter count.
- Strlist
Item - One string-list entry: its address, octet length, and
STRTYPEcode. - TInfo
- The SDK’s
tinfo_t, an opaque type-info handle handled only behind indirection (&TInfoorUniquePtr<TInfo>). - Type
Walk Visitor - The
cxxextern "Rust"opaque the C++ type walk drives by calling its&mut selfmethods, each forwarding into theTypeWalkSinkit was built over. - Type
Write Result - The outcome of a type-write call, returned by value from every type-write function except the two signature-surgery fns.
- XrefRec
- One cross-reference edge, returned inside the
xrefs_buildsnapshot.
Enums§
- SigWrite
Code - The outcome of a signature-surgery call (
func_set_rettype,func_set_argtype,func_rename_arg,func_set_cc,func_prepend_this). - Type
Apply Code - The outcome of a whole-item type apply (
apply_type_decl,apply_named_type,clear_type,apply_type_recipe,tinfo_apply).
Constants§
- BADADDR
- The invalid-address sentinel (
BADADDR); everyAddress-returning facade call uses it for “no address”. - EXIT_
TRAPPED - Sentinel rc a guarded call returns when it trapped a fatal
exit/abortinstead of it tearing down the process. - FF_CODE
MS_CLS-masked flag value marking an address as the head of an instruction.- FF_DATA
MS_CLS-masked flag value marking an address as the head of a data item.- FF_LABL
FF_LABL(bytes.hpp): the address has a dummy (address-derived) name. SeeFF_NAME.- FF_NAME
FF_NAME(bytes.hpp): the address has an explicit or auto-generated name.- FLOW_
CALL InstructionData::flowbit: the instruction is a call.- FLOW_
INDIRECT InstructionData::flowbit: the transfer target is indirect, not statically known.- FLOW_
JUMP InstructionData::flowbit: the instruction jumps.- FLOW_
RET InstructionData::flowbit: the instruction returns.- FLOW_
STOPS InstructionData::flowbit: sequential flow stops after this instruction.- FPC_
NONE InstructionData::fp_control: no EVEX register-form FP control.- FPC_
ROUNDING InstructionData::fp_control: EVEX static rounding ({r?-sae}), mode inround_mode.- FPC_SAE
InstructionData::fp_control: EVEX suppress-all-exceptions only ({sae}), no rounding.- MAXSPECSIZE
- The maximum byte length of one netnode value, sup, or hash object.
- MAX_OPS
- Maximum operands the instruction bridge fills, matching
UA_MAXOP. - MEMBER_
APPEND member_bitvalue that appends a new member at the end rather than a fixed offset.- MS_CLS
- Class mask over an address’s flags word (
MS_CLSinbytes.hpp); the masked value equalsFF_CODEfor an instruction orFF_DATAfor data. - NONE
- Absent optional child / sentinel for the visitor bridge (ctree and tinfo walks).
- OP_FAR
- Semantic operand kind: far branch/call target.
- OP_IMM
- Semantic operand kind: immediate.
- OP_MEM
- Semantic operand kind: memory.
- OP_NEAR
- Semantic operand kind: near branch/call target.
- OP_REG
- Semantic operand kind: register.
- RECIPE_
ARRAY - Recipe opcode: pop one type, push an array of it, followed by a
u64element count. - RECIPE_
BITFIELD - Recipe opcode: build a bitfield member type (
u8container width in bytes,u8field width in bits,u8signedness); struct-member-only, rejected in a union. - RECIPE_
BOOL - Recipe opcode: push the boolean type.
- RECIPE_
CONST - Recipe opcode: pop one type, push its
const-qualified form. - RECIPE_
DECL - Recipe opcode: push a parsed declaration, followed by a
u32length and that many decl bytes. - RECIPE_
FLOAT - Recipe opcode: push a float, followed by a
u8width in bytes. - RECIPE_
FUNCTION - Recipe opcode: build a function type (
u32param count,u8varargs,u16cc, then that manyu32-length-prefixed param names; pops the params then the return type, pushes the function). - RECIPE_
INT - Recipe opcode: push an integer, followed by a
u8width in bytes and au8signedness flag. - RECIPE_
NAMED - Recipe opcode: push a named-type reference, followed by a
u32length and that many name bytes. - RECIPE_
PTR - Recipe opcode: pop one type, push a pointer to it.
- RECIPE_
VOID - Recipe opcode: push the
voidtype. - RECIPE_
VOLATILE - Recipe opcode: pop one type, push its
volatile-qualified form. - REG_
NONE - Sentinel for an absent base/index register in a decoded operand.
- ROUND_
DOWN InstructionData::round_mode: round toward negative infinity.- ROUND_
NEAREST InstructionData::round_mode: round to nearest (even).- ROUND_
UP InstructionData::round_mode: round toward positive infinity.- ROUND_
ZERO InstructionData::round_mode: round toward zero (truncate).- SIG_
APPLY create_funcorapply_tinforejected the rebuilt signature.- SIG_
ARG_ RANGE - A parameter index was past the last parameter.
- SIG_
BUILD - A replacement-type recipe did not build.
- SIG_
NO_ PROTOTYPE - The address carries no function type to edit.
- SIG_OK
- A prototype-surgery edit succeeded.
- STRLYT_
MASK STRLYT_MASKfromnalt.hpp: the STRTYPE bits selecting the layout (terminated vs Pascal).- STRLYT_
SHIFT STRLYT_SHIFTfromnalt.hpp: right-shift applied to theSTRLYT_MASKfield.- STRWIDTH_
MASK STRWIDTH_MASKfromnalt.hpp: the STRTYPE bits selecting bytes-per-character.- TEDIT_
BUILD - Member-edit pre-failure: a member-type recipe did not build.
- TEDIT_
NO_ MEMBER - Member-edit pre-failure: the member (by name or bit offset) did not resolve.
- TEDIT_
NO_ TYPE - Member-edit pre-failure: no such named type in the local til.
- TYPE_
ERR_ APPLY apply_tinforejected the parsed/resolved/built type at the address.- TYPE_
ERR_ INPUT - A bad input to a type apply: an unparseable declaration, a named type that does not exist, or a malformed recipe.
- TYPE_OK
- Result of a successful type apply.
Traits§
- Ctree
Sink - A ctree walk target the visitor drives inline, one method per expression, statement, and local variable kind.
- Type
Walk Sink - A walk target the type visitor drives inline, one method per tinfo node kind.
Functions§
- accept_
eula ⚠ - Accept the EULA programmatically, so headless bring-up never blocks on it.
- apply_
named_ type - Resolve the existing named type
nameand apply it atea.codedistinguishes not-found (_ERR_INPUT) from an apply rejection (_ERR_APPLY);reasonis empty (no error channel). - apply_
type_ decl - Parse
declagainst the local til and apply it atea.codeisTYPE_OK,_ERR_INPUT(parse failed), or_ERR_APPLY. - apply_
type_ recipe - Build the
tinfothe postfix recipe encodes and apply it atea. Same codes asapply_type_decl;_ERR_INPUTis a malformed buffer or an unparseable embedded decl. An unknown named leaf builds a forward reference that fails later at apply, not here. - assignop_
ctype_ ids - This SDK’s
ctype_t(cot_asg*) values in idakitAssignmentOp’s discriminant order, an alignment source for a mirror test. - auto_
wait ⚠ - Block until the auto-analysis queue drains; returns whether it completed.
- bin_
search - First address in
[start, end)matchingpat, orBADADDRwhen absent (headless:NOBREAK | NOSHOWforced). - binop_
ctype_ ids - This SDK’s
ctype_t(cot_*) values in idakitBinaryOp’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. - binpat_
compile - Compile
patternvia IDA’s own parser (byte width taken fromea);Errcarries the parser’s rejection message. - binpat_
from_ bytes - Compile a pattern from raw
bytesand a per-byte bitmask; an emptymaskmeans every byte is concrete. - binpat_
stats - The compiled length and anchor count of
pat. - bitness
- Application bitness (
inf_get_app_bitness): 16, 32, or 64. - block_
kind_ ids - This SDK’s
fc_block_type_t(fcb_*) values in idakitBasicBlockKind’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. Covers only the modelled in-function kinds;fcb_enoret/fcb_externare deliberately absent. - cfg_
block - Bounds and kind of block
n;Errwhennis out of range. - cfg_
build - Build the flow chart for the function containing
ea;Errwhen no function is there. Runs analysis, so it can also fail from a thrown SDK exception. - cfg_
nblocks - Total number of basic blocks (external blocks included).
- cfg_
npred - Number of predecessors of block
n(0whennis out of range). - cfg_
nproper - Number of blocks belonging to the function’s own range.
- cfg_
nsucc - Number of successors of block
n(0whennis out of range). - cfg_
pred - The
i-th predecessor block index of blockn;Errwhenn/iis out of range. - cfg_
preds - The whole predecessor edge list of block
nas one ownedVec<u32>;Errwhennis out of range. - cfg_
succ - The
i-th successor block index of blockn;Errwhenn/iis out of range. - cfg_
succs - The whole successor edge list of block
nas one ownedVec<u32>;Errwhennis out of range. - cfunc_
counts - Statement, expression, and call-site counts of
cf’s ctree. - cfunc_
expr_ gap - The extraction-fidelity diagnostic for
cf: total expressions the SDK visitor sees vs how many the extraction walker should materialize. - cfunc_
pseudocode - The rendered pseudocode of
cf, tags stripped;Errif the SDK cannot produce it. - cfunc_
refresh_ text - Re-print
cf’s pseudocode from its current ctree (refresh_func_ctext), then return it;Errif the SDK cannot produce it. Cheap compared to a re-decompile, since it walks the already-decompiled ctree, but reflects only what the ctree already encodes (a rename resolves fresh; a structural or type change needs a freshdecompile). - cfunc_
walk_ ⚠ctree - Walk
cfunc’s ctree, minting nodes and locals throughnodesand node types through the tinfo walker whose pointer is passed as an integer address intype_visitor(cxxhas noc_void; the C++ side reinterprets it back tovoid*for the shared type walker). Returns the root statement handle. - clear_
cached_ cfuncs - Evict every cached decompilation; a no-op if the decompiler is not initialized.
- clear_
type - Clear any type applied at
ea. Idempotent:codeisTYPE_OKwhen there was nothing to clear;reasonis empty (no error channel). - close_
database ⚠ - Close the current database, saving it first when
saveis set. - cm_
cc_ ids - This SDK’s
CM_CC_*values in idakitCallingConvention’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. Emitted in the raw pre-shifted high-nibble space the SDK stores them in (CM_CC_CDECLis0x30); covers only the modelled plain conventions. - cref_
type_ ids - This SDK’s
cref_t(fl_*) values in idakitCodeXref’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. - decode_
insn - Decode the instruction at
ea, folding raw operands into semantic kinds with resolved register names and control-flow facts. Infallible at the boundary: the result code lands inInstructionData::statusrather than throwing, since the -3/-4 failures carry structured payloads. - decompile
- Decompile the function at
eainto a heapcfuncptr_towned by aUniquePtr(one owned ref);Erron any decompile failure. Wrapped in the facade trap, so a fatalexit()surfaces as a trappedErrthe caller distinguishes via its own trap query. TheUniquePtr’s cxx deleter runs~cfuncptr_t(release()) on drop. - define_
type - Parse the C declaration(s) in
inputinto the local til.codeis the parse-error count (0= ok). - delete_
type - Delete the named type
type_namefrom the local til, the inverse ofdefine_type. See theTEDIT_*codes. - demangle_
name - Fully demangled form of
name;Errwhennameis not mangled. - dref_
type_ ids - This SDK’s
dref_t(dr_*) values in idakitDataXref’s discriminant order, an alignment source for a mirror test. - enable_
console_ ⚠messages - Enable or disable idalib’s console message output.
- enum_
add_ member - Add an enum constant named
member_namewithvalueto the named enumtype_name, in the explicit bitmask groupbmask(DEFMASK64lets a bitmask enum usevalueitself as the group mask; ignored by an ordinary enum), passingetf_flags(etf_flag_t, e.g.ETF_FORCENAME) toadd_edm. SameTEDIT_*codes as theudt_*fns. - enum_
del_ member - Delete the enum constant
member_namefrom the named enumtype_name. - enum_
del_ member_ by_ value - Delete the enum constant carrying
valuefrom the named enumtype_name(tinfo_t::del_edm_by_value), the value-keyed sibling ofenum_del_member. Uses the default bitmask (DEFMASK64) and serial (0), so it targets the plain value match, not a specific bitmask group or serial.TERR_NOT_FOUND(TypeEditCode::NotFound) when no constant carriesvalue. - enum_
rename_ member - Rename the enum constant
member_namein the named enumtype_nametonew_name, passingetf_flags(etf_flag_t, e.g.ETF_FORCENAME) torename_edm. - enum_
set_ bitmask - Set whether the named enum
type_nameis a bitmask (flag) enum (tinfo_t::set_enum_is_bitmask). SameTEDIT_*codes as theudt_*/enum_*fns. - enum_
set_ member_ value - Set the value of the enum constant
member_namein the named enumtype_name. - enum_
set_ repr - Set the value representation on the named enum
type_name(tinfo_t::set_enum_repr), the enum-level twin ofudt_set_member_repr.vtypeis avalue_repr_tFRB_* value-type nibble;is_signed/leading_zerosset FRB_SIGNED/FRB_LZERO. - enum_
set_ width - Set the storage width in bytes of the named enum
type_name’s underlying type (tinfo_t::set_enum_width);0means unspecified. - export_
ea - Address of export
idx, orBADADDRwhen the export is a pure forwarder. - export_
forwarder - Forwarder target of export
idx;Errwhen it has none (most exports do not). - export_
name - Name of export
idx;Errwhen it has none. - export_
ordinal - Ordinal of export
idx. - export_
qty - Number of exported entry points in the database (
get_entry_qty). - file_
type_ name - Human-readable input file format text;
Errwhen unavailable. - forward_
declare_ type - Reserve
type_namein the local til as an incomplete aggregate (tinfo_t::create_forward_decl), without a body.decl_typeis atype_t(BTF_STRUCT/BTF_UNION/BTF_ENUM) selecting the aggregate kind.codeis the rawtinfo_code_t(0= ok); noTEDIT_*pre-failure, since there is no existing type to load first. - frb_
vtype_ ids - This SDK’s
FRB_*value-type nibbles in idakitNumberFormat’s discriminant order, an alignment source for a mirror test. Covers only the modelled non-info-carrying subset. - func_
bitness - Addressing width in bits of the function at
ea: 16, 32, or 64, or 0 when not a function. - func_
chunk_ qty - Number of chunks (entry plus tails) of the function at
ea, or0. - func_
cmt - Comment of the function at
ea(repeatable ifrepeatable);Errwhen there is none. - func_
does_ return - Whether the function at
calleeis known to return (func_does_return). - func_ea
- Entry address of the
n-th function, orBADADDRwhennis out of range. - func_
end - Entry-chunk end address of the function at
ea, orBADADDRwhen not a function. - func_
flags func_t::flagsof the function atea, or0wheneais not a function.- func_
name - Name of the function at
ea;Errwhen it has none. - func_
prepend_ this - Insert an implicit
thisparameter of the recipe type at index 0, then rebuild and re-apply. - func_
qty - Number of functions in the database (
get_func_qty). - func_
rename_ arg - Rename parameter
idxtoname, then rebuild and re-apply.arityreports the current parameter count;SIG_ARG_RANGEwhenidxis past it. - func_
set_ argtype - Replace parameter
idx’s type with the recipe type, then rebuild and re-apply.arityreports the current parameter count;SIG_ARG_RANGEwhenidxis past it. - func_
set_ cc - Set the calling convention of the function type at
eato the rawCM_CC_*codecc, then rebuild and re-apply. - func_
set_ rettype - Replace the return type of the function type at
eawith the recipe type, then rebuild and re-apply. See theSIG_*codes. - func_
start - Entry address of the function containing
ea, orBADADDRwhen there is none. - func_
type - The prototype of the function at
ea(one line,PRTYPE_1LINE);Errwhen it has no type. - gen_
seg_ align - Alignment code (
sa*) of segmentn, or0whennis out of range. - gen_
seg_ at - Index of the segment containing
ea, or-1when none does (get_segm_num). - gen_
seg_ bitness - Address bits (16/32/64) of segment
n, or0when out of range. - gen_
seg_ class - Class of segment
n;Errwhennis out of range or has no class. - gen_
seg_ cmt - Comment of segment
n(repeatableselects the repeatable channel);Errwhennis out of range. - gen_
seg_ color - Background color (
bgcolor_t) of segmentn, orDEFCOLORwhennis out of range. - gen_
seg_ comb - Combination code (
sc*) of segmentn, or0whennis out of range. - gen_
seg_ end - End address of segment
n, orBADADDRwhennis out of range. - gen_
seg_ flags - Flag bits (
SFL_*) of segmentn, or0whennis out of range. - gen_
seg_ name - Visible name of segment
n;Errwhennis out of range. - gen_
seg_ perm - Permission bits (
SEGPERM_*) of segmentn, or0when out of range. - gen_
seg_ qty - Number of segments in the current database (
get_segm_qty). - gen_
seg_ sel - Selector (
sel_t) of segmentn, orBADSELwhennis out of range. - gen_
seg_ start - Start address of segment
n, orBADADDRwhennis out of range. - gen_
seg_ type - Segment type code (
SEG_*) of segmentn, orSEG_NORMwhennis out of range. - get_
bytes - The
sizebytes ateaas an ownedVec<u8>;Errwhen the range is not fully mapped. - get_
bytes_ ⚠into - Read
sizebytes starting ataddressintobuf; returns the count read, or negative on failure. - get_cmt
- The regular (or repeatable, when
rptble) comment atea;Errwhen there is none. - get_
ea_ name - Name at address
ea;Errwhen the address has none. - get_
ea_ name_ flags - Name at address
eaundergtn_flags(GN_*bits);Errwhen the address has none. - get_
flags - Flag word of the item at
ea(get_flags). - get_
item_ end - Address just past the item covering
ea(get_item_end). - get_
item_ head - Start address of the item covering
ea(eaitself when it is an item head). - get_
library_ ⚠version - Read the running IDA’s version into
major/minor/build; returns whether it succeeded. - get_
name_ ea - Address the symbol
nameresolves to, orBADADDRwhen it is unknown. - get_
next_ head - Next item head after
ea, searching up tomaxea, orBADADDRwhen none. - get_
prev_ head - Previous item head before
ea, searching down tominea, orBADADDRwhen none. - get_
qerrno ⚠ - The calling thread’s last
error_tcode. - get_
strlit - The auto-detected string literal at
ea(given itsSTRTYPE) decoded to UTF-8;Errwhen there is none or it cannot be decoded. - get_u8
- The byte at
ea;Errwhen it is uninitialized. - get_u16
- The little-endian word at
ea;Errwhen any covered byte is uninitialized. - get_u32
- The little-endian dword at
ea;Errwhen any covered byte is uninitialized. - get_u64
- The little-endian qword at
ea;Errwhen any covered byte is uninitialized. - guarded_
auto_ ⚠wait - Guarded
auto_wait, trapped against a fatal exit/abort; returns its rc. - guarded_
close ⚠ - Guarded
close_database, trapped against a fatal exit/abort; returns its rc. - guarded_
open ⚠ - Guarded
open_database: same signature and rc, trapped against a fatal exit/abort. - has_
auto_ name - Whether a flags word marks an IDA-generated (auto) name.
- has_
cached_ cfunc - Whether
eahas a cached decompilation;falseif none or not initialized. - has_
dummy_ name - Whether a flags word marks a dummy (address-derived) name.
- has_
external_ refs - Whether
eahas a reference from outside the function that contains it;falsewheneais not inside any function. - has_
jump_ or_ flow_ xref - Whether
eahas an incoming jump or ordinary-flow code cross-reference. - has_
user_ name - Whether a flags word marks a user-given (explicit) name.
- hexrays_
init - Initialize the Hex-Rays decompiler (loading the plugin if needed);
trueonce ready. - image_
base - Preferred load address of the input (
get_imagebase). - imports_
build - The whole import table as an owned,
Sendsnapshot, built in one walk of every module’senum_import_names. - init_
headless ⚠ - Force headless (
TVHEADLESS), then initialize idalib; returns its rc. - init_
library ⚠ - Initialize idalib.
argc/argvare forwarded from the process; returns 0 on success. - input_
path - Full path of the analyzed input;
Errwhen unknown. - is_
main_ ⚠thread - Whether the calling thread is IDA’s main (kernel) thread.
- is_
public_ name - Whether the name at
eais public (linker-exported). - is_
weak_ name - Whether the name at
eais weak (may be overridden by another definition). - last_
exit_ ⚠code - The process exit code the most recent guarded call trapped, if any.
- last_
output ⚠ - Copy the most recent guarded call’s captured output into
buf/cap, snprintf-style. - mark_
cfunc_ dirty - Evict the cached decompilation for
ea;trueif an entry existed,falseif none or the decompiler is not initialized. - max_ea
- One past the highest mapped address in the database (
inf_get_max_ea). - min_ea
- Lowest mapped address in the database (
inf_get_min_ea). - netnode_
altdel - Delete the alt value at
idxundertag. - netnode_
altdel_ all - Delete the entire alt array under
tag. - netnode_
altdel_ ea - Delete the alt value keyed by address
eaundertag. - netnode_
altdel_ idx8 - Delete the alt value at 8-bit index
idxundertag. - netnode_
altfirst - Lowest populated alt index under
tag, orBADNODEwhen the array is empty. - netnode_
altfirst_ idx8 - Lowest populated 8-bit alt index under
tag, orBADNODEwhen the array is empty. - netnode_
altlast - Highest populated alt index under
tag, orBADNODEwhen the array is empty. - netnode_
altlast_ idx8 - Highest populated 8-bit alt index under
tag, orBADNODEwhen the array is empty. - netnode_
altnext - Next populated alt index after
curundertag, orBADNODEwhen none. - netnode_
altnext_ idx8 - Next populated 8-bit alt index after
curundertag, orBADNODEwhen none. - netnode_
altprev - Previous populated alt index before
curundertag, orBADNODEwhen none. - netnode_
altprev_ idx8 - Previous populated 8-bit alt index before
curundertag, orBADNODEwhen none. - netnode_
altset - Set the alt value at
idxundertagtovalue. - netnode_
altset_ ea - Set the alt value keyed by address
eaundertagtovalue. - netnode_
altset_ idx8 - Set the alt value at 8-bit index
idxundertagtovalue. - netnode_
altshift - Shift the alt array under
tag; the number of elements moved. - netnode_
altval - Alt value at
idxundertag, or0when unset. - netnode_
altval_ ea - Alt value keyed by address
eaundertag, or0when unset. - netnode_
altval_ idx8 - Alt value at 8-bit index
idxundertag, or0when unset. - netnode_
blobshift - Shift the blob array under
tag; the number of elements moved. - netnode_
blobsize - Byte length of the blob based at index
startundertag, or0when absent. - netnode_
blobsize_ ea - Byte length of the blob based at address
eaundertag, or0when absent. - netnode_
by_ name - Resolve the netnode named
name, creating it whencreate; the node id, orBADNODEwhen it is absent andcreateis false. - netnode_
chardel - Delete the char value at
idxundertag. - netnode_
chardel_ ea - Delete the char value keyed by address
eaundertag. - netnode_
chardel_ idx8 - Delete the char value at 8-bit index
idxundertag. - netnode_
charset - Set the char value at
idxundertag(low 8 bits ofvalue). - netnode_
charset_ ea - Set the char value keyed by address
eaundertag(low 8 bits ofvalue). - netnode_
charset_ idx8 - Set the char value at 8-bit index
idxundertag(low 8 bits ofvalue). - netnode_
charshift - Shift the char array under
tag; the number of elements moved. - netnode_
charval - Char value at
idxundertag(0..255), or0when unset. - netnode_
charval_ ea - Char value keyed by address
eaundertag(0..255), or0when unset. - netnode_
charval_ idx8 - Char value at 8-bit index
idxundertag(0..255), or0when unset. - netnode_
copyto - Copy (or move, when
move_)countnodes starting atnodeontotarget; the number of nodes affected. - netnode_
del_ value - Delete the node value of
node. - netnode_
delblob - Delete the blob based at index
startundertag; the number of slots freed. - netnode_
exists - Whether
nodehas any information attached (a named or non-empty node). - netnode_
exists_ name - Whether a netnode named
nameexists, without creating it. - netnode_
first - Lowest-id existing netnode, or
BADNODEwhen the database has none. - netnode_
get_ name - Name of
node;Errwhen it is unnamed. - netnode_
getblob - The blob based at index
startundertagas owned bytes;Errwhen absent. - netnode_
getblob_ ea - The blob based at address
eaundertagas owned bytes;Errwhen absent. - netnode_
hashdel - Delete the hash value for
keyundertag. - netnode_
hashdel_ all - Delete the entire hash array under
tag. - netnode_
hashfirst - Lexically first hash key under
tag;Errwhen the hash is empty. - netnode_
hashlast - Lexically last hash key under
tag;Errwhen the hash is empty. - netnode_
hashnext - Hash key after
keyundertag;Errwhenkeyis the last. - netnode_
hashprev - Hash key before
keyundertag;Errwhenkeyis the first. - netnode_
hashset - Set the hash value for
keyundertag(maxMAXSPECSIZEbytes);falsewhenvalueis empty or over the cap, either of which the SDK cannot store. - netnode_
hashset_ long - Set the hash value for
keyundertagto the integervalue. - netnode_
hashstr - Hash value for
keyundertagas a string;Errwhen the key is unset. - netnode_
hashval - Hash value for
keyundertagas raw bytes;Errwhen the key is unset. - netnode_
hashval_ long - Hash value for
keyundertagdecoded as an integer, or0when unset. - netnode_
kill - Delete
nodeand every array attached to it. - netnode_
last - Highest-id existing netnode, or
BADNODEwhen the database has none. - netnode_
lower_ bound - Lowest populated sup index
>= curundertag, orBADNODEwhen none. - netnode_
lower_ bound_ idx8 - Lowest populated 8-bit sup index at or after
idxundertag, orBADNODEwhen none. - netnode_
next - Next existing netnode after
cur, orBADNODEwhencuris the last. - netnode_
prev - Previous existing netnode before
cur, orBADNODEwhencuris the first. - netnode_
rename - Rename
nodetoname(empty clears the name);falsewhennameis taken. - netnode_
set_ value - Set the node value of
node(maxMAXSPECSIZEbytes). - netnode_
setblob - Store
valueas the blob based at indexstartundertag. - netnode_
setblob_ ea - Store
valueas the blob based at addresseaundertag. - netnode_
supdel - Delete the sup value at
idxundertag. - netnode_
supdel_ all - Delete the entire sup array under
tag. - netnode_
supdel_ ea - Delete the sup value keyed by address
eaundertag. - netnode_
supdel_ idx8 - Delete the sup value at 8-bit index
idxundertag. - netnode_
supdel_ range - Delete sup elements in
[idx1, idx2)undertag; the number deleted. - netnode_
supfirst - Lowest populated sup index under
tag, orBADNODEwhen the array is empty. - netnode_
supfirst_ idx8 - Lowest populated 8-bit sup index under
tag, orBADNODEwhen the array is empty. - netnode_
suplast - Highest populated sup index under
tag, orBADNODEwhen the array is empty. - netnode_
suplast_ idx8 - Highest populated 8-bit sup index under
tag, orBADNODEwhen the array is empty. - netnode_
supnext - Next populated sup index after
curundertag, orBADNODEwhen none. - netnode_
supnext_ idx8 - Next populated 8-bit sup index after
curundertag, orBADNODEwhen none. - netnode_
supprev - Previous populated sup index before
curundertag, orBADNODEwhen none. - netnode_
supprev_ idx8 - Previous populated 8-bit sup index before
curundertag, orBADNODEwhen none. - netnode_
supset - Set the sup value at
idxundertag(maxMAXSPECSIZEbytes);falsewhenvalueis empty or over the cap, either of which the SDK cannot store. - netnode_
supset_ ea - Set the sup value keyed by address
eaundertag(maxMAXSPECSIZEbytes);falsewhenvalueis empty or over the cap, either of which the SDK cannot store. - netnode_
supset_ idx8 - Set the sup value at 8-bit index
idxundertag(maxMAXSPECSIZEbytes);falsewhenvalueis empty or over the cap, either of which the SDK cannot store. - netnode_
supshift - Shift the sup array under
tag; the number of elements moved. - netnode_
supstr - Sup value at
idxundertagas a string;Errwhen unset. - netnode_
supstr_ ea - Sup value keyed by address
eaundertagas a string;Errwhen unset. - netnode_
supstr_ idx8 - Sup value at 8-bit index
idxundertagas a string;Errwhen unset. - netnode_
supval - Sup value at
idxundertagas raw bytes;Errwhen unset. - netnode_
supval_ ea - Sup value keyed by address
eaundertagas raw bytes;Errwhen unset. - netnode_
supval_ idx8 - Sup value at 8-bit index
idxundertagas raw bytes;Errwhen unset. - netnode_
value - The node value of
nodeas raw bytes;Errwhen no value is set. - netnode_
value_ str - The node value of
nodeas a string;Errwhen no value is set. - nlist_
ea - Address of name-list entry
idx. - nlist_
name - Name of name-list entry
idx;Errwhenidxis out of range. - nlist_
size - Number of entries in the sorted name list (
get_nlist_size). - op_
dtype_ ids - This SDK’s
op_dtype_t(dt_*) values in idakitDataType’s discriminant order, an alignment source for a mirror test. - open_
database ⚠ - Open the database at
path, optionally queuing auto-analysis (run_auto) withargsforwarded to it; returns its rc. - patch_
bytes - Patch
bytesoverea, orfalsewithout writing when any target byte is unmapped. - proc_
name - Processor module id, e.g.
metapc;Errwhen none is set. - qstrerror⚠
- Describe an
error_t. The returned pointer borrows IDA’s static/thread-local storage: it must not be freed, and a laterqstrerrorcall on the same thread may overwrite it. Copy it into aCStr/Stringbefore the next IDA call. - range_
all_ chunks - Every chunk (entry plus tails) of the function at
eaas one ownedVec;Errwhen no function is there. - range_
chunk_ info - Chunk
nof the function ateaas aChunkInfo;Errwhennis out of range. - range_
entry_ chunk - Entry chunk (index
0) of the function containingea, returned by value;Errwhen no function is there. - range_
size - Size (
end - start) of arange_tpassed by value. - reg_
class_ ids - The facade’s
RegisterClasscodes in idakit’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. - reg_
read_ ⚠int - Read IDA registry integer
name, ordefvalwhen unset. - rename_
type - Rename the named type
type_nametonew_namein place, preserving its ordinal. SameTEDIT_*codes as theudt_*/enum_*fns. - root_
filename - Base filename of the input;
Errwhen unknown. - seg_
align_ ids - This SDK’s
sa*values in idakitSegmentAlignment’s discriminant order, an alignment source for a mirror test. - seg_
comb_ ids - This SDK’s
sc*values in idakitSegmentCombination’s discriminant order, an alignment source for a mirror test. - seg_
type_ ids - This SDK’s
SEG_*values in idakitSegmentType’s discriminant order, an alignment source pinning the Rust mirror to this SDK build in a test. - set_
batch ⚠ - Set IDA’s
batchglobal: nonzero suppresses dialogs/auto-answers prompts, zero restores interactive behavior. - set_cmt⚠
- Set the comment at
address(repeatable whenrptble); returns whether it succeeded. - set_
name ⚠ - Set
address’s name tonameunderflags(SN_*bits); returns whether it succeeded. - strlist_
build - (Re)build IDA’s string list, an O(database) scan of the whole image.
- strlist_
item - The
n-th string-list entry as aStrlistItem;Errwhennis out of range. - strlist_
qty - Number of entries in the current string list (
get_strlist_qty). - strlit_
contents - Decode the string literal at
ea(given octet length andSTRTYPE) semantically (STRCONV_REPLCHAR: undecodable units become U+FFFD);Errwhen it cannot be read. - strlit_
escaped - Decode the string literal at
eato its C-escaped display form (STRCONV_ESCAPE, as the decompiler renders it);Errwhen it cannot be read. - structural_
tag_ ctype_ ids - This SDK’s
ctype_tvalues for the structural tags idakit’s ctree extraction dispatches on, in itsStructuralTagdiscriminant order, an alignment source for a mirror test. - tinfo_
apply - Apply the built
handleatea(apply_tinfo,TINFO_DEFINITE | flags).codeisTYPE_OK/_ERR_APPLY; the handle is not consumed. - tinfo_
array - An
nelems-element array ofinneras a fresh handle.inneris copied, not consumed; a null handle whennelemsexceedsu32or the array cannot be built. - tinfo_
bool - The boolean type as a fresh
UniquePtrhandle. - tinfo_
code_ ids - This SDK’s
tinfo_code_t(TERR_*) values in idakitTypeEditCode’s discriminant order, an alignment source for a mirror test. Signed: every code butTERR_OKis negative. TheTERR_COUNTsentinel is not a code and is absent. - tinfo_
const - A
const-qualified copy ofinneras a fresh handle.inneris not consumed. - tinfo_
decl - The type
declparses to against the local til, as a fresh handle;Err(with the captured parse diagnostic) on a parse failure. - tinfo_
float - A
bytes-wide float (4 or 8) as a fresh handle; a null handle when the width is not 4 or 8. - tinfo_
int - A
bytes-wide integer (1/2/4/8/16), signed whenis_signed, as a fresh handle; a null handle when the width is unsupported. - tinfo_
named - The named type
nameas a fresh handle, an unresolved typedef ref. Builds a non-null forward reference even for a name absent from the local til, so the caller checks existence separately. - tinfo_
ptr - A pointer to
inneras a fresh handle.inneris copied, not consumed; a null handle if the pointer type cannot be built. - tinfo_
void - The
voidtype as a freshUniquePtrhandle, freed by the cxx deleter (~tinfo_t) on drop. - tinfo_
volatile - A
volatile-qualified copy ofinneras a fresh handle.inneris not consumed. - type_
name_ at - Name of the local type at
ordinal(empty for an anonymous type);Errwhen the ordinal holds no type. - type_
ordinal_ limit - Exclusive upper bound on local-type ordinals: valid ordinals run
1..limit. - udt_
add_ member - Add a member of the recipe type to the named struct/union
type_nameat bit offsetmember_bit(or appended when it isMEMBER_APPEND). An emptymember_nameadds an anonymous member. See theTEDIT_*codes. - udt_
del_ member - Delete the member selected by
member_name(or, when it is empty, by bit offsetmember_bit) fromtype_name. - udt_
rename_ member - Rename the member selected by
member_name(or, when it is empty, by bit offsetmember_bit) intype_nametonew_name. - udt_
set_ member_ comment - Set the comment on the member selected by
member_name(or, when it is empty, by bit offsetmember_bit) intype_nametocomment, a plain member comment (is_regcmt=false). - udt_
set_ member_ repr - Set the value representation on the member selected by
member_name(or, when it is empty, by bit offsetmember_bit) intype_name.vtypeis avalue_repr_tFRB_* value-type nibble;is_signed/leading_zerosset FRB_SIGNED/FRB_LZERO. - udt_
set_ member_ type - Replace the type of the member selected by
member_name(or, when it is empty, by bit offsetmember_bit) intype_namewith the recipe type, passingetf_flags(etf_flag_t, e.g.ETF_COMPATIBLE) toset_udm_type. - unop_
ctype_ ids - This SDK’s
ctype_tvalues in idakitUnaryOp’s discriminant order, an alignment source for a mirror test. - walk_
frame_ type - Walk the stack frame of the function at
ea, interning each variable’s type intosink. - walk_
func_ type - Walk the prototype of the function at
eaintosink; the function-address twin ofwalk_type_named.Nonewhen the function has no type info. - walk_
type_ named - Walk the local type named
nameintosinkvia thecxxopaque visitor; returns the root handle, orNonewhen no such type exists (or a name was not valid UTF-8, surfaced as a thrownErr). - walk_
type_ ordinal - Walk the local type at
ordinalintosink; the ordinal twin ofwalk_type_named. - was_
trapped ⚠ - Whether the most recent guarded call trapped a fatal exit/abort.
- xrefs_
build - Every cross-reference edge at
eaas an owned,Sendsnapshot: xrefs toeawhenis_to, else xrefs from it. Ordinary next-instruction flow edges are included only whenflow(XREF_FLOWvsXREF_NOFLOW).
Type Aliases§
- Address
- IDA’s effective address (
ea_t), compiled__EA64__.