IDA C++ SDK 9.2
Loading...
Searching...
No Matches
nalt.hpp File Reference

Definitions of various information kept in netnodes. More...

Go to the source code of this file.

Classes

struct  xrefpos_t
struct  array_parameters_t
struct  switch_info_t
 Information about a switch statement. More...
struct  custom_data_type_ids_t
struct  refinfo_t
 Information about a reference. More...
struct  custom_refinfo_handler_t
 Manage a custom refinfo type Custom refinfos are usually used to handle custom fixups, but can also be used to display non-standard references. More...
struct  refinfo_desc_t
 Get descriptions of all standard and custom refinfo types. More...
struct  strpath_t
 Information for structure offsets. More...
struct  enum_const_t
 See opinfo_t::ec. More...
union  opinfo_t
 Additional information about an operand type. More...
struct  printop_t

Typedefs

typedef uchar reftype_t
 see Types of references
typedef qvector< refinfo_desc_trefinfo_desc_vec_t
typedef uchar type_t
 In serialized form, a type is represented by a byte sequence.
typedef uchar p_list
 several p_string's

Functions

idaman nodeidx_t ida_export ea2node (ea_t ea)
 Get netnode for the specified address.
idaman ea_t ida_export node2ea (nodeidx_t ndx)
idaman nodeidx_t ida_export end_ea2node (ea_t ea)
netnode getnode (ea_t ea)
idaman void ida_export set_notcode (ea_t ea)
 Mark address so that it cannot be converted to instruction.
void clr_notcode (ea_t ea)
 Clear not-code mark.
bool is_notcode (ea_t ea)
 Is the address marked as not-code?
void set_visible_item (ea_t ea, bool visible)
 Change visibility of item at given ea.
bool is_visible_item (ea_t ea)
 Test visibility of item at given ea.
bool is_finally_visible_item (ea_t ea)
 Is instruction visible?
bool is_reftype_target_optional (reftype_t type)
 Can the target be calculated using operand value?
idaman reftype_t ida_export get_reftype_by_size (size_t size)
 Get REF_... constant from size Supported sizes: 1,2,4,8,16 For other sizes returns reftype_t(-1)
idaman int ida_export register_custom_refinfo (const custom_refinfo_handler_t *crh)
 Register a new custom refinfo type.
idaman bool ida_export unregister_custom_refinfo (int crid)
 Unregister a new custom refinfo type.
idaman int ida_export find_custom_refinfo (const char *name)
 Get id of a custom refinfo type.
idaman const custom_refinfo_handler_t *ida_export get_custom_refinfo (int crid)
 Get definition of a registered custom refinfo type.
const custom_refinfo_handler_t *idaapi get_custom_refinfo_handler (const refinfo_t &ri)
 Get refinfo handler.
 DECLARE_TYPE_AS_MOVABLE (refinfo_desc_t)
idaman void ida_export get_refinfo_descs (refinfo_desc_vec_t *descs)
idaman ssize_t ida_export get_root_filename (char *buf, size_t bufsize)
 Get file name only of the input file.
idaman ssize_t ida_export dbg_get_input_path (char *buf, size_t bufsize)
 Get debugger input file name/path (see #LFLG_DBG_NOPATH)
ssize_t idaapi get_input_file_path (char *buf, size_t bufsize)
 Get full path of the input file.
void set_root_filename (const char *file)
 Set full path of the input file.
size_t idaapi retrieve_input_file_size (void)
 Get size of input file in bytes.
uint32 idaapi retrieve_input_file_crc32 (void)
 Get input file crc32 stored in the database.
bool idaapi retrieve_input_file_md5 (uchar hash[16])
 Get input file md5.
bool idaapi retrieve_input_file_sha256 (uchar hash[32])
 Get input file sha256.
ssize_t idaapi get_asm_inc_file (qstring *buf)
 Get name of the include file.
bool idaapi set_asm_inc_file (const char *file)
 Set name of the include file.
ea_t idaapi get_imagebase (void)
 Get image base address.
void idaapi set_imagebase (ea_t base)
 Set image base address.
netnode idaapi get_ids_modnode (void)
 Get ids modnode.
void idaapi set_ids_modnode (netnode id)
 Set ids modnode.
ssize_t idaapi get_archive_path (qstring *out)
 Get archive file path from which input file was extracted.
bool set_archive_path (const char *file)
 Set archive file path from which input file was extracted.
ssize_t idaapi get_loader_format_name (qstring *out)
 Get file format name for loader modules.
void set_loader_format_name (const char *name)
 Set file format name for loader modules.
ssize_t idaapi get_initial_ida_version (qstring *out)
 Get version of ida which created the database (string format like "7.5")
ssize_t idaapi get_ida_notepad_text (qstring *out)
 Get notepad text.
void idaapi set_ida_notepad_text (const char *text, size_t size=0)
 Set notepad text.
ssize_t idaapi get_srcdbg_paths (qstring *out)
 Get source debug paths.
void idaapi set_srcdbg_paths (const char *paths)
 Set source debug paths.
ssize_t idaapi get_srcdbg_undesired_paths (qstring *out)
 Get user-closed source files.
void idaapi set_srcdbg_undesired_paths (const char *paths)
 Set user-closed source files.
ushort idaapi get_initial_idb_version ()
 Get initial version of the database (numeric format like 700)
time_t idaapi get_idb_ctime ()
 Get database creation timestamp.
size_t idaapi get_elapsed_secs ()
 Get seconds database stayed open.
size_t idaapi get_idb_nopens ()
 Get number of times the database is opened.
idaman int ida_export validate_idb_names (bool do_repair)
 Check consistency of name records, return number of bad ones.
void set_gotea (ea_t gotea)
ea_t get_gotea (void)
Get structure ID

Returns the struct id of the struct type at the specified address.

Use this function when is_struct()==true

idaman tid_t ida_export get_strid (ea_t ea)
xrefpos
idaman ssize_t ida_export get_xrefpos (xrefpos_t *out, ea_t ea)
idaman void ida_export set_xrefpos (ea_t ea, const xrefpos_t *in)
void idaapi del_xrefpos (ea_t ea)
Source line numbers

They are sometimes present in object files.

idaman void ida_export set_source_linnum (ea_t ea, uval_t lnnum)
idaman uval_t ida_export get_source_linnum (ea_t ea)
idaman void ida_export del_source_linnum (ea_t ea)
Absolute segment base address

These functions may be used if necessary (despite of the AFLNOTE above).

ea_t get_absbase (ea_t ea)
void set_absbase (ea_t ea, ea_t x)
void del_absbase (ea_t ea)
Purged bytes

Number of bytes purged from the stack when a function is called indirectly get_ind_purged() may be used if necessary (despite of the AFLNOTE above).

Use set_purged() to modify this value (do not use set_ind_purged())

idaman ea_t ida_export get_ind_purged (ea_t ea)
void set_ind_purged (ea_t ea, ea_t x)
void del_ind_purged (ea_t ea)
Get type of string

Use higher level function get_opinfo().

idaman uint32 ida_export get_str_type (ea_t ea)
idaman void ida_export set_str_type (ea_t ea, uint32 x)
idaman void ida_export del_str_type (ea_t ea)
Work with string type codes
THREAD_SAFE uchar idaapi get_str_type_code (int32 strtype)
THREAD_SAFE char get_str_term1 (int32 strtype)
THREAD_SAFE char get_str_term2 (int32 strtype)
THREAD_SAFE uchar idaapi get_str_encoding_idx (int32 strtype)
 Get index of the string encoding for this string.
THREAD_SAFE int32 set_str_encoding_idx (int32 strtype, int encoding_idx)
 Set index of the string encoding in the string type.
THREAD_SAFE int32 make_str_type (uchar type_code, int encoding_idx, uchar term1=0, uchar term2=0)
 Get string type for a string in the given encoding.
THREAD_SAFE bool is_pascal (int32 strtype)
THREAD_SAFE size_t get_str_type_prefix_length (int32 strtype)
Alignment value

(should be power of 2) These functions may be used if necessary (despite of the AFLNOTE above).

uint32 get_alignment (ea_t ea)
void set_alignment (ea_t ea, uint32 x)
void del_alignment (ea_t ea)
Instruction/Data background color
idaman void ida_export set_item_color (ea_t ea, bgcolor_t color)
idaman bgcolor_t ida_export get_item_color (ea_t ea)
idaman bool ida_export del_item_color (ea_t ea)
Array representation
idaman ssize_t ida_export get_array_parameters (array_parameters_t *out, ea_t ea)
idaman void ida_export set_array_parameters (ea_t ea, const array_parameters_t *in)
void idaapi del_array_parameters (ea_t ea)
Switch info

See switch_info_t, xref.hpp for related functions

idaman ssize_t ida_export get_switch_info (switch_info_t *out, ea_t ea)
idaman void ida_export set_switch_info (ea_t ea, const switch_info_t &in)
idaman void ida_export del_switch_info (ea_t ea)
Switch parent

Address which holds the switch info (switch_info_t).

Used at the jump targets.

ea_t get_switch_parent (ea_t ea)
void set_switch_parent (ea_t ea, ea_t x)
void del_switch_parent (ea_t ea)
Custom data types
idaman int ida_export get_custom_data_type_ids (custom_data_type_ids_t *cdis, ea_t ea)
idaman void ida_export set_custom_data_type_ids (ea_t ea, const custom_data_type_ids_t *cdis)
void idaapi del_custom_data_type_ids (ea_t ea)
Get/Set refinfo

n may be 0, 1, 2, #OPND_MASK.

#OPND_OUTER may be used too. Don't use these functions, see get_opinfo(), set_opinfo()

idaman bool ida_export set_refinfo_ex (ea_t ea, int n, const refinfo_t *ri)
idaman bool ida_export set_refinfo (ea_t ea, int n, reftype_t type, ea_t target=BADADDR, ea_t base=0, adiff_t tdelta=0)
idaman bool ida_export get_refinfo (refinfo_t *ri, ea_t ea, int n)
idaman bool ida_export del_refinfo (ea_t ea, int n)
Structure paths

Structure paths for unions and structures with unions (strpath) a structure path is an array of id's.

the first id is the id of the structure itself. additional id's (if any) specify which member of a union we should select the maximal size of array is #MAXSTRUCPATH. strpaths are used to determine how to display structure offsets.

idaman void ida_export write_struc_path (ea_t ea, int idx, const tid_t *path, int plen, adiff_t delta)
idaman int ida_export read_struc_path (tid_t *path, adiff_t *delta, ea_t ea, int idx)
Types

Work with function/data types These functions may be used if necessary (despite of the AFLNOTE above).

idaman bool ida_export get_tinfo (tinfo_t *tif, ea_t ea)
idaman bool ida_export set_tinfo (ea_t ea, const tinfo_t *tif)
void idaapi del_tinfo (ea_t ea)
Operand types

These functions may be used if necessary (despite of the AFLNOTE above).

idaman bool ida_export get_op_tinfo (tinfo_t *tif, ea_t ea, int n)
idaman bool ida_export set_op_tinfo (ea_t ea, int n, const tinfo_t *tif)
void idaapi del_op_tinfo (ea_t ea, int n)
String encodings

Encoding names can be a codepage names (CP1251, windows-1251), charset name (Shift-JIS, UTF-8), or just codepage number (866, 932).

user-accessible encodings are counted from 1 (index 0 is reserved)

idaman int ida_export get_encoding_qty ()
 Get total number of encodings (counted from 0)
idaman const char *ida_export get_encoding_name (int idx)
 Get encoding name for specific index (1-based).
idaman int ida_export add_encoding (const char *encname)
 Add a new encoding (e.g.
idaman bool ida_export del_encoding (int idx)
 Delete an encoding The encoding is not actually removed because its index may be used in strtype.
idaman bool ida_export rename_encoding (int idx, const char *encname)
 Change name for an encoding The number of bytes per unit (BPU) of the new encoding must match this number of the existing default encoding.
idaman int ida_export get_encoding_bpu (int idx)
 Get the amount of bytes per unit (e.g., 2 for UTF-16, 4 for UTF-32) for the encoding with the given index.
idaman int ida_export get_encoding_bpu_by_name (const char *encname)
 Get the amount of bytes per unit for the given encoding.
int get_strtype_bpu (int32 strtype)
idaman int ida_export get_default_encoding_idx (int bpu)
 Get default encoding index for a specific string type.
idaman bool ida_export set_default_encoding_idx (int bpu, int idx)
 Set default encoding for a string type.
const char *idaapi encoding_from_strtype (int32 strtype)
 Get encoding name for this strtype.
idaman int ida_export get_outfile_encoding_idx ()
 Get the index of the encoding used when producing files.
idaman bool ida_export set_outfile_encoding_idx (int idx)
 set encoding to be used when producing files

Variables

const reftype_t V695_REF_OFF8 = 0
 reserved
const reftype_t REF_OFF16 = 1
 16bit full offset
const reftype_t REF_OFF32 = 2
 32bit full offset
const reftype_t REF_LOW8 = 3
 low 8bits of 16bit offset
const reftype_t REF_LOW16 = 4
 low 16bits of 32bit offset
const reftype_t REF_HIGH8 = 5
 high 8bits of 16bit offset
const reftype_t REF_HIGH16 = 6
 high 16bits of 32bit offset
const reftype_t V695_REF_VHIGH = 7
 obsolete
const reftype_t V695_REF_VLOW = 8
 obsolete
const reftype_t REF_OFF64 = 9
 64bit full offset
const reftype_t REF_OFF8 = 10
 8bit full offset
const reftype_t REF_LAST = REF_OFF8

Work with additional location flags

See Additional flags for the location

using aflags_t = flags_t
idaman void ida_export set_aflags (ea_t ea, aflags_t flags)
idaman void ida_export upd_abits (ea_t ea, aflags_t clr_bits, aflags_t set_bits)
idaman void ida_export set_abits (ea_t ea, aflags_t bits)
idaman void ida_export clr_abits (ea_t ea, aflags_t bits)
idaman aflags_t ida_export get_aflags (ea_t ea)
idaman void ida_export del_aflags (ea_t ea)
constexpr bool has_aflag_linnum (aflags_t flags)
constexpr bool is_aflag_usersp (aflags_t flags)
constexpr bool is_aflag_public_name (aflags_t flags)
constexpr bool is_aflag_weak_name (aflags_t flags)
constexpr bool is_aflag_hidden_item (aflags_t flags)
constexpr bool is_aflag_manual_insn (aflags_t flags)
constexpr bool is_aflag_hidden_border (aflags_t flags)
constexpr bool is_aflag_zstroff (aflags_t flags)
constexpr bool is_aflag__bnot0 (aflags_t flags)
constexpr bool is_aflag__bnot1 (aflags_t flags)
constexpr bool is_aflag_libitem (aflags_t flags)
constexpr bool has_aflag_ti (aflags_t flags)
constexpr bool has_aflag_ti0 (aflags_t flags)
constexpr bool has_aflag_ti1 (aflags_t flags)
constexpr bool has_aflag_lname (aflags_t flags)
constexpr bool is_aflag_tilcmt (aflags_t flags)
constexpr bool is_aflag_lzero0 (aflags_t flags)
constexpr bool is_aflag_lzero1 (aflags_t flags)
constexpr bool is_aflag_colored_item (aflags_t flags)
constexpr bool is_aflag_terse_struc (aflags_t flags)
constexpr bool is_aflag__invsign0 (aflags_t flags)
constexpr bool is_aflag__invsign1 (aflags_t flags)
constexpr bool is_aflag_noret (aflags_t flags)
constexpr bool is_aflag_fixed_spd (aflags_t flags)
constexpr bool is_aflag_align_flow (aflags_t flags)
constexpr bool is_aflag_userti (aflags_t flags)
constexpr bool is_aflag_retfp (aflags_t flags)
constexpr bool uses_aflag_modsp (aflags_t flags)
constexpr bool is_aflag_notcode (aflags_t flags)
constexpr bool is_aflag_notproc (aflags_t flags)
constexpr bool is_aflag_type_guessed_by_ida (aflags_t flags)
constexpr bool is_aflag_func_guessed_by_hexrays (aflags_t flags)
constexpr bool is_aflag_data_guessed_by_hexrays (aflags_t flags)
constexpr bool is_aflag_type_determined_by_hexrays (aflags_t flags)
constexpr bool is_aflag_type_guessed_by_hexrays (aflags_t flags)
bool is_hidden_item (ea_t ea)
void hide_item (ea_t ea)
void unhide_item (ea_t ea)
bool is_hidden_border (ea_t ea)
void hide_border (ea_t ea)
void unhide_border (ea_t ea)
bool uses_modsp (ea_t ea)
void set_usemodsp (ea_t ea)
void clr_usemodsp (ea_t ea)
bool is_zstroff (ea_t ea)
void set_zstroff (ea_t ea)
void clr_zstroff (ea_t ea)
bool is__bnot0 (ea_t ea)
void set__bnot0 (ea_t ea)
void clr__bnot0 (ea_t ea)
bool is__bnot1 (ea_t ea)
void set__bnot1 (ea_t ea)
void clr__bnot1 (ea_t ea)
bool is_libitem (ea_t ea)
void set_libitem (ea_t ea)
void clr_libitem (ea_t ea)
bool has_ti (ea_t ea)
void set_has_ti (ea_t ea)
void clr_has_ti (ea_t ea)
bool has_ti0 (ea_t ea)
void set_has_ti0 (ea_t ea)
void clr_has_ti0 (ea_t ea)
bool has_ti1 (ea_t ea)
void set_has_ti1 (ea_t ea)
void clr_has_ti1 (ea_t ea)
bool has_lname (ea_t ea)
void set_has_lname (ea_t ea)
void clr_has_lname (ea_t ea)
bool is_tilcmt (ea_t ea)
void set_tilcmt (ea_t ea)
void clr_tilcmt (ea_t ea)
bool is_usersp (ea_t ea)
void set_usersp (ea_t ea)
void clr_usersp (ea_t ea)
bool is_lzero0 (ea_t ea)
void set_lzero0 (ea_t ea)
void clr_lzero0 (ea_t ea)
bool is_lzero1 (ea_t ea)
void set_lzero1 (ea_t ea)
void clr_lzero1 (ea_t ea)
bool is_colored_item (ea_t ea)
void set_colored_item (ea_t ea)
void clr_colored_item (ea_t ea)
bool is_terse_struc (ea_t ea)
void set_terse_struc (ea_t ea)
void clr_terse_struc (ea_t ea)
bool is__invsign0 (ea_t ea)
void set__invsign0 (ea_t ea)
void clr__invsign0 (ea_t ea)
bool is__invsign1 (ea_t ea)
void set__invsign1 (ea_t ea)
void clr__invsign1 (ea_t ea)
bool is_noret (ea_t ea)
void set_noret (ea_t ea)
void clr_noret (ea_t ea)
bool is_fixed_spd (ea_t ea)
void set_fixed_spd (ea_t ea)
void clr_fixed_spd (ea_t ea)
bool is_align_flow (ea_t ea)
void set_align_flow (ea_t ea)
void clr_align_flow (ea_t ea)
bool is_userti (ea_t ea)
void set_userti (ea_t ea)
void clr_userti (ea_t ea)
bool is_retfp (ea_t ea)
void set_retfp (ea_t ea)
void clr_retfp (ea_t ea)
bool is_notproc (ea_t ea)
void set_notproc (ea_t ea)
void clr_notproc (ea_t ea)
bool is_type_guessed_by_ida (ea_t ea)
bool is_func_guessed_by_hexrays (ea_t ea)
bool is_data_guessed_by_hexrays (ea_t ea)
bool is_type_determined_by_hexrays (ea_t ea)
bool is_type_guessed_by_hexrays (ea_t ea)
void set_type_guessed_by_ida (ea_t ea)
void set_func_guessed_by_hexrays (ea_t ea)
void set_data_guessed_by_hexrays (ea_t ea)
void set_type_determined_by_hexrays (ea_t ea)

Functions to work with imports

typedef int idaapi import_enum_cb_t(ea_t ea, const char *name, uval_t ord, void *param)
 Callback for enumerating imports.
idaman uint ida_export get_import_module_qty ()
 Get number of import modules.
idaman bool ida_export get_import_module_name (qstring *buf, int mod_index)
 Get import module name.
idaman int ida_export enum_import_names (int mod_index, import_enum_cb_t *callback, void *param=nullptr)
 Enumerate imports from specific module.
idaman void ida_export delete_imports (void)
 Delete all imported modules information.

Detailed Description

Definitions of various information kept in netnodes.

Each address in the program has a corresponding netnode: netnode(ea).

If we have no information about an address, the corresponding netnode is not created. Otherwise we will create a netnode and save information in it. All variable length information (names, comments, offset information, etc) is stored in the netnode.

Don't forget that some information is already stored in the flags (bytes.hpp)

Warning
Many of the functions in this file are very low level (they are marked as low level functions). Use them only if you can't find higher level function to set/get/del information.

You can create your own nodes in IDP module and store information in them. See netnode.

Typedef Documentation

◆ aflags_t

using aflags_t = flags_t

◆ reftype_t

◆ refinfo_desc_vec_t

◆ type_t

typedef uchar type_t

In serialized form, a type is represented by a byte sequence.

(see Type flags) We call it a type string.

◆ p_list

typedef uchar p_list

several p_string's

◆ import_enum_cb_t

typedef int idaapi import_enum_cb_t(ea_t ea, const char *name, uval_t ord, void *param)

Callback for enumerating imports.

Parameters
eaimport address
nameimport name (nullptr if imported by ordinal)
ordimport ordinal (0 for imports by name)
paramuser parameter passed to enum_import_names()
Return values
1ok
0stop enumeration

Function Documentation

◆ ea2node()

idaman nodeidx_t ida_export ea2node ( ea_t ea)

Get netnode for the specified address.

◆ node2ea()

idaman ea_t ida_export node2ea ( nodeidx_t ndx)

◆ end_ea2node()

idaman nodeidx_t ida_export end_ea2node ( ea_t ea)

◆ getnode()

netnode getnode ( ea_t ea)
inline

◆ get_strid()

idaman tid_t ida_export get_strid ( ea_t ea)

◆ get_xrefpos()

idaman ssize_t ida_export get_xrefpos ( xrefpos_t * out,
ea_t ea )

◆ set_xrefpos()

idaman void ida_export set_xrefpos ( ea_t ea,
const xrefpos_t * in )

◆ del_xrefpos()

void idaapi del_xrefpos ( ea_t ea)
inline

◆ set_aflags()

idaman void ida_export set_aflags ( ea_t ea,
aflags_t flags )

◆ upd_abits()

idaman void ida_export upd_abits ( ea_t ea,
aflags_t clr_bits,
aflags_t set_bits )

◆ set_abits()

idaman void ida_export set_abits ( ea_t ea,
aflags_t bits )

◆ clr_abits()

idaman void ida_export clr_abits ( ea_t ea,
aflags_t bits )

◆ get_aflags()

idaman aflags_t ida_export get_aflags ( ea_t ea)

◆ del_aflags()

idaman void ida_export del_aflags ( ea_t ea)

◆ has_aflag_linnum()

bool has_aflag_linnum ( aflags_t flags)
inlineconstexpr

◆ is_aflag_usersp()

bool is_aflag_usersp ( aflags_t flags)
inlineconstexpr

◆ is_aflag_public_name()

bool is_aflag_public_name ( aflags_t flags)
inlineconstexpr

◆ is_aflag_weak_name()

bool is_aflag_weak_name ( aflags_t flags)
inlineconstexpr

◆ is_aflag_hidden_item()

bool is_aflag_hidden_item ( aflags_t flags)
inlineconstexpr

◆ is_aflag_manual_insn()

bool is_aflag_manual_insn ( aflags_t flags)
inlineconstexpr

◆ is_aflag_hidden_border()

bool is_aflag_hidden_border ( aflags_t flags)
inlineconstexpr

◆ is_aflag_zstroff()

bool is_aflag_zstroff ( aflags_t flags)
inlineconstexpr

◆ is_aflag__bnot0()

bool is_aflag__bnot0 ( aflags_t flags)
inlineconstexpr

◆ is_aflag__bnot1()

bool is_aflag__bnot1 ( aflags_t flags)
inlineconstexpr

◆ is_aflag_libitem()

bool is_aflag_libitem ( aflags_t flags)
inlineconstexpr

◆ has_aflag_ti()

bool has_aflag_ti ( aflags_t flags)
inlineconstexpr

◆ has_aflag_ti0()

bool has_aflag_ti0 ( aflags_t flags)
inlineconstexpr

◆ has_aflag_ti1()

bool has_aflag_ti1 ( aflags_t flags)
inlineconstexpr

◆ has_aflag_lname()

bool has_aflag_lname ( aflags_t flags)
inlineconstexpr

◆ is_aflag_tilcmt()

bool is_aflag_tilcmt ( aflags_t flags)
inlineconstexpr

◆ is_aflag_lzero0()

bool is_aflag_lzero0 ( aflags_t flags)
inlineconstexpr

◆ is_aflag_lzero1()

bool is_aflag_lzero1 ( aflags_t flags)
inlineconstexpr

◆ is_aflag_colored_item()

bool is_aflag_colored_item ( aflags_t flags)
inlineconstexpr

◆ is_aflag_terse_struc()

bool is_aflag_terse_struc ( aflags_t flags)
inlineconstexpr

◆ is_aflag__invsign0()

bool is_aflag__invsign0 ( aflags_t flags)
inlineconstexpr

◆ is_aflag__invsign1()

bool is_aflag__invsign1 ( aflags_t flags)
inlineconstexpr

◆ is_aflag_noret()

bool is_aflag_noret ( aflags_t flags)
inlineconstexpr

◆ is_aflag_fixed_spd()

bool is_aflag_fixed_spd ( aflags_t flags)
inlineconstexpr

◆ is_aflag_align_flow()

bool is_aflag_align_flow ( aflags_t flags)
inlineconstexpr

◆ is_aflag_userti()

bool is_aflag_userti ( aflags_t flags)
inlineconstexpr

◆ is_aflag_retfp()

bool is_aflag_retfp ( aflags_t flags)
inlineconstexpr

◆ uses_aflag_modsp()

bool uses_aflag_modsp ( aflags_t flags)
inlineconstexpr

◆ is_aflag_notcode()

bool is_aflag_notcode ( aflags_t flags)
inlineconstexpr

◆ is_aflag_notproc()

bool is_aflag_notproc ( aflags_t flags)
inlineconstexpr

◆ is_aflag_type_guessed_by_ida()

bool is_aflag_type_guessed_by_ida ( aflags_t flags)
inlineconstexpr

◆ is_aflag_func_guessed_by_hexrays()

bool is_aflag_func_guessed_by_hexrays ( aflags_t flags)
inlineconstexpr

◆ is_aflag_data_guessed_by_hexrays()

bool is_aflag_data_guessed_by_hexrays ( aflags_t flags)
inlineconstexpr

◆ is_aflag_type_determined_by_hexrays()

bool is_aflag_type_determined_by_hexrays ( aflags_t flags)
inlineconstexpr

◆ is_aflag_type_guessed_by_hexrays()

bool is_aflag_type_guessed_by_hexrays ( aflags_t flags)
inlineconstexpr

◆ is_hidden_item()

bool is_hidden_item ( ea_t ea)
inline

◆ hide_item()

void hide_item ( ea_t ea)
inline

◆ unhide_item()

void unhide_item ( ea_t ea)
inline

◆ is_hidden_border()

bool is_hidden_border ( ea_t ea)
inline

◆ hide_border()

void hide_border ( ea_t ea)
inline

◆ unhide_border()

void unhide_border ( ea_t ea)
inline

◆ uses_modsp()

bool uses_modsp ( ea_t ea)
inline

◆ set_usemodsp()

void set_usemodsp ( ea_t ea)
inline

◆ clr_usemodsp()

void clr_usemodsp ( ea_t ea)
inline

◆ is_zstroff()

bool is_zstroff ( ea_t ea)
inline

◆ set_zstroff()

void set_zstroff ( ea_t ea)
inline

◆ clr_zstroff()

void clr_zstroff ( ea_t ea)
inline

◆ is__bnot0()

bool is__bnot0 ( ea_t ea)
inline

◆ set__bnot0()

void set__bnot0 ( ea_t ea)
inline

◆ clr__bnot0()

void clr__bnot0 ( ea_t ea)
inline

◆ is__bnot1()

bool is__bnot1 ( ea_t ea)
inline

◆ set__bnot1()

void set__bnot1 ( ea_t ea)
inline

◆ clr__bnot1()

void clr__bnot1 ( ea_t ea)
inline

◆ is_libitem()

bool is_libitem ( ea_t ea)
inline

◆ set_libitem()

void set_libitem ( ea_t ea)
inline

◆ clr_libitem()

void clr_libitem ( ea_t ea)
inline

◆ has_ti()

bool has_ti ( ea_t ea)
inline

◆ set_has_ti()

void set_has_ti ( ea_t ea)
inline

◆ clr_has_ti()

void clr_has_ti ( ea_t ea)
inline

◆ has_ti0()

bool has_ti0 ( ea_t ea)
inline

◆ set_has_ti0()

void set_has_ti0 ( ea_t ea)
inline

◆ clr_has_ti0()

void clr_has_ti0 ( ea_t ea)
inline

◆ has_ti1()

bool has_ti1 ( ea_t ea)
inline

◆ set_has_ti1()

void set_has_ti1 ( ea_t ea)
inline

◆ clr_has_ti1()

void clr_has_ti1 ( ea_t ea)
inline

◆ has_lname()

bool has_lname ( ea_t ea)
inline

◆ set_has_lname()

void set_has_lname ( ea_t ea)
inline

◆ clr_has_lname()

void clr_has_lname ( ea_t ea)
inline

◆ is_tilcmt()

bool is_tilcmt ( ea_t ea)
inline

◆ set_tilcmt()

void set_tilcmt ( ea_t ea)
inline

◆ clr_tilcmt()

void clr_tilcmt ( ea_t ea)
inline

◆ is_usersp()

bool is_usersp ( ea_t ea)
inline

◆ set_usersp()

void set_usersp ( ea_t ea)
inline

◆ clr_usersp()

void clr_usersp ( ea_t ea)
inline

◆ is_lzero0()

bool is_lzero0 ( ea_t ea)
inline

◆ set_lzero0()

void set_lzero0 ( ea_t ea)
inline

◆ clr_lzero0()

void clr_lzero0 ( ea_t ea)
inline

◆ is_lzero1()

bool is_lzero1 ( ea_t ea)
inline

◆ set_lzero1()

void set_lzero1 ( ea_t ea)
inline

◆ clr_lzero1()

void clr_lzero1 ( ea_t ea)
inline

◆ is_colored_item()

bool is_colored_item ( ea_t ea)
inline

◆ set_colored_item()

void set_colored_item ( ea_t ea)
inline

◆ clr_colored_item()

void clr_colored_item ( ea_t ea)
inline

◆ is_terse_struc()

bool is_terse_struc ( ea_t ea)
inline

◆ set_terse_struc()

void set_terse_struc ( ea_t ea)
inline

◆ clr_terse_struc()

void clr_terse_struc ( ea_t ea)
inline

◆ is__invsign0()

bool is__invsign0 ( ea_t ea)
inline

◆ set__invsign0()

void set__invsign0 ( ea_t ea)
inline

◆ clr__invsign0()

void clr__invsign0 ( ea_t ea)
inline

◆ is__invsign1()

bool is__invsign1 ( ea_t ea)
inline

◆ set__invsign1()

void set__invsign1 ( ea_t ea)
inline

◆ clr__invsign1()

void clr__invsign1 ( ea_t ea)
inline

◆ is_noret()

bool is_noret ( ea_t ea)
inline

◆ set_noret()

void set_noret ( ea_t ea)
inline

◆ clr_noret()

void clr_noret ( ea_t ea)
inline

◆ is_fixed_spd()

bool is_fixed_spd ( ea_t ea)
inline

◆ set_fixed_spd()

void set_fixed_spd ( ea_t ea)
inline

◆ clr_fixed_spd()

void clr_fixed_spd ( ea_t ea)
inline

◆ is_align_flow()

bool is_align_flow ( ea_t ea)
inline

◆ set_align_flow()

void set_align_flow ( ea_t ea)
inline

◆ clr_align_flow()

void clr_align_flow ( ea_t ea)
inline

◆ is_userti()

bool is_userti ( ea_t ea)
inline

◆ set_userti()

void set_userti ( ea_t ea)
inline

◆ clr_userti()

void clr_userti ( ea_t ea)
inline

◆ is_retfp()

bool is_retfp ( ea_t ea)
inline

◆ set_retfp()

void set_retfp ( ea_t ea)
inline

◆ clr_retfp()

void clr_retfp ( ea_t ea)
inline

◆ is_notproc()

bool is_notproc ( ea_t ea)
inline

◆ set_notproc()

void set_notproc ( ea_t ea)
inline

◆ clr_notproc()

void clr_notproc ( ea_t ea)
inline

◆ is_type_guessed_by_ida()

bool is_type_guessed_by_ida ( ea_t ea)
inline

◆ is_func_guessed_by_hexrays()

bool is_func_guessed_by_hexrays ( ea_t ea)
inline

◆ is_data_guessed_by_hexrays()

bool is_data_guessed_by_hexrays ( ea_t ea)
inline

◆ is_type_determined_by_hexrays()

bool is_type_determined_by_hexrays ( ea_t ea)
inline

◆ is_type_guessed_by_hexrays()

bool is_type_guessed_by_hexrays ( ea_t ea)
inline

◆ set_type_guessed_by_ida()

void set_type_guessed_by_ida ( ea_t ea)
inline

◆ set_func_guessed_by_hexrays()

void set_func_guessed_by_hexrays ( ea_t ea)
inline

◆ set_data_guessed_by_hexrays()

void set_data_guessed_by_hexrays ( ea_t ea)
inline

◆ set_type_determined_by_hexrays()

void set_type_determined_by_hexrays ( ea_t ea)
inline

◆ set_notcode()

idaman void ida_export set_notcode ( ea_t ea)

Mark address so that it cannot be converted to instruction.

◆ clr_notcode()

void clr_notcode ( ea_t ea)
inline

Clear not-code mark.

◆ is_notcode()

bool is_notcode ( ea_t ea)
inline

Is the address marked as not-code?

◆ set_visible_item()

void set_visible_item ( ea_t ea,
bool visible )
inline

Change visibility of item at given ea.

◆ is_visible_item()

bool is_visible_item ( ea_t ea)
inline

Test visibility of item at given ea.

◆ is_finally_visible_item()

bool is_finally_visible_item ( ea_t ea)
inline

Is instruction visible?

◆ set_source_linnum()

idaman void ida_export set_source_linnum ( ea_t ea,
uval_t lnnum )

◆ get_source_linnum()

idaman uval_t ida_export get_source_linnum ( ea_t ea)

◆ del_source_linnum()

idaman void ida_export del_source_linnum ( ea_t ea)

◆ get_absbase()

ea_t get_absbase ( ea_t ea)
inline

◆ set_absbase()

void set_absbase ( ea_t ea,
ea_t x )
inline

◆ del_absbase()

void del_absbase ( ea_t ea)
inline

◆ get_ind_purged()

idaman ea_t ida_export get_ind_purged ( ea_t ea)

◆ set_ind_purged()

void set_ind_purged ( ea_t ea,
ea_t x )
inline

◆ del_ind_purged()

void del_ind_purged ( ea_t ea)
inline

◆ get_str_type()

idaman uint32 ida_export get_str_type ( ea_t ea)

◆ set_str_type()

idaman void ida_export set_str_type ( ea_t ea,
uint32 x )

◆ del_str_type()

idaman void ida_export del_str_type ( ea_t ea)

◆ get_str_type_code()

THREAD_SAFE uchar idaapi get_str_type_code ( int32 strtype)
inline

◆ get_str_term1()

THREAD_SAFE char get_str_term1 ( int32 strtype)
inline

◆ get_str_term2()

THREAD_SAFE char get_str_term2 ( int32 strtype)
inline

◆ get_str_encoding_idx()

THREAD_SAFE uchar idaapi get_str_encoding_idx ( int32 strtype)
inline

Get index of the string encoding for this string.

◆ set_str_encoding_idx()

THREAD_SAFE int32 set_str_encoding_idx ( int32 strtype,
int encoding_idx )
inline

Set index of the string encoding in the string type.

◆ make_str_type()

THREAD_SAFE int32 make_str_type ( uchar type_code,
int encoding_idx,
uchar term1 = 0,
uchar term2 = 0 )
inline

Get string type for a string in the given encoding.

◆ is_pascal()

THREAD_SAFE bool is_pascal ( int32 strtype)
inline

◆ get_str_type_prefix_length()

THREAD_SAFE size_t get_str_type_prefix_length ( int32 strtype)
inline

◆ get_alignment()

uint32 get_alignment ( ea_t ea)
inline

◆ set_alignment()

void set_alignment ( ea_t ea,
uint32 x )
inline

◆ del_alignment()

void del_alignment ( ea_t ea)
inline

◆ set_item_color()

idaman void ida_export set_item_color ( ea_t ea,
bgcolor_t color )

◆ get_item_color()

idaman bgcolor_t ida_export get_item_color ( ea_t ea)

◆ del_item_color()

idaman bool ida_export del_item_color ( ea_t ea)

◆ get_array_parameters()

idaman ssize_t ida_export get_array_parameters ( array_parameters_t * out,
ea_t ea )

◆ set_array_parameters()

idaman void ida_export set_array_parameters ( ea_t ea,
const array_parameters_t * in )

◆ del_array_parameters()

void idaapi del_array_parameters ( ea_t ea)
inline

◆ get_switch_info()

idaman ssize_t ida_export get_switch_info ( switch_info_t * out,
ea_t ea )

◆ set_switch_info()

idaman void ida_export set_switch_info ( ea_t ea,
const switch_info_t & in )

◆ del_switch_info()

idaman void ida_export del_switch_info ( ea_t ea)

◆ get_switch_parent()

ea_t get_switch_parent ( ea_t ea)
inline

◆ set_switch_parent()

void set_switch_parent ( ea_t ea,
ea_t x )
inline

◆ del_switch_parent()

void del_switch_parent ( ea_t ea)
inline

◆ get_custom_data_type_ids()

idaman int ida_export get_custom_data_type_ids ( custom_data_type_ids_t * cdis,
ea_t ea )

◆ set_custom_data_type_ids()

idaman void ida_export set_custom_data_type_ids ( ea_t ea,
const custom_data_type_ids_t * cdis )

◆ del_custom_data_type_ids()

void idaapi del_custom_data_type_ids ( ea_t ea)
inline

◆ is_reftype_target_optional()

bool is_reftype_target_optional ( reftype_t type)
inline

Can the target be calculated using operand value?

◆ get_reftype_by_size()

idaman reftype_t ida_export get_reftype_by_size ( size_t size)

Get REF_... constant from size Supported sizes: 1,2,4,8,16 For other sizes returns reftype_t(-1)

◆ register_custom_refinfo()

idaman int ida_export register_custom_refinfo ( const custom_refinfo_handler_t * crh)

Register a new custom refinfo type.

◆ unregister_custom_refinfo()

idaman bool ida_export unregister_custom_refinfo ( int crid)

Unregister a new custom refinfo type.

◆ find_custom_refinfo()

idaman int ida_export find_custom_refinfo ( const char * name)

Get id of a custom refinfo type.

◆ get_custom_refinfo()

idaman const custom_refinfo_handler_t *ida_export get_custom_refinfo ( int crid)

Get definition of a registered custom refinfo type.

◆ get_custom_refinfo_handler()

const custom_refinfo_handler_t *idaapi get_custom_refinfo_handler ( const refinfo_t & ri)
inline

Get refinfo handler.

◆ DECLARE_TYPE_AS_MOVABLE()

DECLARE_TYPE_AS_MOVABLE ( refinfo_desc_t )

◆ get_refinfo_descs()

idaman void ida_export get_refinfo_descs ( refinfo_desc_vec_t * descs)

◆ set_refinfo_ex()

idaman bool ida_export set_refinfo_ex ( ea_t ea,
int n,
const refinfo_t * ri )

◆ set_refinfo()

idaman bool ida_export set_refinfo ( ea_t ea,
int n,
reftype_t type,
ea_t target = BADADDR,
ea_t base = 0,
adiff_t tdelta = 0 )

◆ get_refinfo()

idaman bool ida_export get_refinfo ( refinfo_t * ri,
ea_t ea,
int n )

◆ del_refinfo()

idaman bool ida_export del_refinfo ( ea_t ea,
int n )

◆ write_struc_path()

idaman void ida_export write_struc_path ( ea_t ea,
int idx,
const tid_t * path,
int plen,
adiff_t delta )

◆ read_struc_path()

idaman int ida_export read_struc_path ( tid_t * path,
adiff_t * delta,
ea_t ea,
int idx )

◆ get_tinfo()

idaman bool ida_export get_tinfo ( tinfo_t * tif,
ea_t ea )

◆ set_tinfo()

idaman bool ida_export set_tinfo ( ea_t ea,
const tinfo_t * tif )

◆ del_tinfo()

void idaapi del_tinfo ( ea_t ea)
inline

◆ get_op_tinfo()

idaman bool ida_export get_op_tinfo ( tinfo_t * tif,
ea_t ea,
int n )

◆ set_op_tinfo()

idaman bool ida_export set_op_tinfo ( ea_t ea,
int n,
const tinfo_t * tif )

◆ del_op_tinfo()

void idaapi del_op_tinfo ( ea_t ea,
int n )
inline

◆ get_root_filename()

idaman ssize_t ida_export get_root_filename ( char * buf,
size_t bufsize )

Get file name only of the input file.

◆ dbg_get_input_path()

idaman ssize_t ida_export dbg_get_input_path ( char * buf,
size_t bufsize )

Get debugger input file name/path (see #LFLG_DBG_NOPATH)

◆ get_input_file_path()

ssize_t idaapi get_input_file_path ( char * buf,
size_t bufsize )
inline

Get full path of the input file.

◆ set_root_filename()

void set_root_filename ( const char * file)
inline

Set full path of the input file.

◆ retrieve_input_file_size()

size_t idaapi retrieve_input_file_size ( void )
inline

Get size of input file in bytes.

◆ retrieve_input_file_crc32()

uint32 idaapi retrieve_input_file_crc32 ( void )
inline

Get input file crc32 stored in the database.

it can be used to check that the input file has not been changed.

◆ retrieve_input_file_md5()

bool idaapi retrieve_input_file_md5 ( uchar hash[16])
inline

Get input file md5.

◆ retrieve_input_file_sha256()

bool idaapi retrieve_input_file_sha256 ( uchar hash[32])
inline

Get input file sha256.

◆ get_asm_inc_file()

ssize_t idaapi get_asm_inc_file ( qstring * buf)
inline

Get name of the include file.

◆ set_asm_inc_file()

bool idaapi set_asm_inc_file ( const char * file)
inline

Set name of the include file.

◆ get_imagebase()

ea_t idaapi get_imagebase ( void )
inline

Get image base address.

◆ set_imagebase()

void idaapi set_imagebase ( ea_t base)
inline

Set image base address.

◆ get_ids_modnode()

netnode idaapi get_ids_modnode ( void )
inline

Get ids modnode.

◆ set_ids_modnode()

void idaapi set_ids_modnode ( netnode id)
inline

Set ids modnode.

◆ get_archive_path()

ssize_t idaapi get_archive_path ( qstring * out)
inline

Get archive file path from which input file was extracted.

◆ set_archive_path()

bool set_archive_path ( const char * file)
inline

Set archive file path from which input file was extracted.

◆ get_loader_format_name()

ssize_t idaapi get_loader_format_name ( qstring * out)
inline

Get file format name for loader modules.

◆ set_loader_format_name()

void set_loader_format_name ( const char * name)
inline

Set file format name for loader modules.

◆ get_initial_ida_version()

ssize_t idaapi get_initial_ida_version ( qstring * out)
inline

Get version of ida which created the database (string format like "7.5")

◆ get_ida_notepad_text()

ssize_t idaapi get_ida_notepad_text ( qstring * out)
inline

Get notepad text.

◆ set_ida_notepad_text()

void idaapi set_ida_notepad_text ( const char * text,
size_t size = 0 )
inline

Set notepad text.

◆ get_srcdbg_paths()

ssize_t idaapi get_srcdbg_paths ( qstring * out)
inline

Get source debug paths.

◆ set_srcdbg_paths()

void idaapi set_srcdbg_paths ( const char * paths)
inline

Set source debug paths.

◆ get_srcdbg_undesired_paths()

ssize_t idaapi get_srcdbg_undesired_paths ( qstring * out)
inline

Get user-closed source files.

◆ set_srcdbg_undesired_paths()

void idaapi set_srcdbg_undesired_paths ( const char * paths)
inline

Set user-closed source files.

◆ get_initial_idb_version()

ushort idaapi get_initial_idb_version ( )
inline

Get initial version of the database (numeric format like 700)

◆ get_idb_ctime()

time_t idaapi get_idb_ctime ( )
inline

Get database creation timestamp.

◆ get_elapsed_secs()

size_t idaapi get_elapsed_secs ( )
inline

Get seconds database stayed open.

◆ get_idb_nopens()

size_t idaapi get_idb_nopens ( )
inline

Get number of times the database is opened.

◆ get_encoding_qty()

idaman int ida_export get_encoding_qty ( )

Get total number of encodings (counted from 0)

◆ get_encoding_name()

idaman const char *ida_export get_encoding_name ( int idx)

Get encoding name for specific index (1-based).

Parameters
idxthe encoding index (1-based)
Return values
nullptrif IDX is out of bounds
emptystring if the encoding was deleted

◆ add_encoding()

idaman int ida_export add_encoding ( const char * encname)

Add a new encoding (e.g.

"UTF-8"). If it's already in the list, return its index.

Parameters
encnamethe encoding name
Returns
its index (1-based); -1 means error

◆ del_encoding()

idaman bool ida_export del_encoding ( int idx)

Delete an encoding The encoding is not actually removed because its index may be used in strtype.

So the deletion just clears the encoding name. The default encoding cannot be deleted.

Parameters
idxthe encoding index (1-based)

◆ rename_encoding()

idaman bool ida_export rename_encoding ( int idx,
const char * encname )

Change name for an encoding The number of bytes per unit (BPU) of the new encoding must match this number of the existing default encoding.

Specifying the empty name simply deletes this encoding.

Parameters
idxthe encoding index (1-based)
encnamethe new encoding name

◆ get_encoding_bpu()

idaman int ida_export get_encoding_bpu ( int idx)

Get the amount of bytes per unit (e.g., 2 for UTF-16, 4 for UTF-32) for the encoding with the given index.

Parameters
idxthe encoding index (1-based)
Returns
the number of bytes per units (1/2/4); -1 means error

◆ get_encoding_bpu_by_name()

idaman int ida_export get_encoding_bpu_by_name ( const char * encname)

Get the amount of bytes per unit for the given encoding.

Parameters
encnamethe encoding name
Returns
the number of bytes per units (1/2/4); -1 means error

◆ get_strtype_bpu()

int get_strtype_bpu ( int32 strtype)
inline

◆ get_default_encoding_idx()

idaman int ida_export get_default_encoding_idx ( int bpu)

Get default encoding index for a specific string type.

Parameters
bputhe amount of bytes per unit (e.g., 1 for ASCII, CP1252, UTF-8..., 2 for UTF-16, 4 for UTF-32)
Return values
0bad BPU argument

◆ set_default_encoding_idx()

idaman bool ida_export set_default_encoding_idx ( int bpu,
int idx )

Set default encoding for a string type.

Parameters
bputhe amount of bytes per unit
idxthe encoding index. It cannot be 0

◆ encoding_from_strtype()

const char *idaapi encoding_from_strtype ( int32 strtype)
inline

Get encoding name for this strtype.

Return values
nullptrif STRTYPE has an incorrect encoding index
emptystring if the encoding was deleted

◆ get_outfile_encoding_idx()

idaman int ida_export get_outfile_encoding_idx ( )

Get the index of the encoding used when producing files.

Return values
0the IDB's default 1 byte-per-unit encoding is used

◆ set_outfile_encoding_idx()

idaman bool ida_export set_outfile_encoding_idx ( int idx)

set encoding to be used when producing files

Parameters
idxthe encoding index IDX can be 0 to use the IDB's default 1-byte-per-unit encoding

◆ get_import_module_qty()

idaman uint ida_export get_import_module_qty ( )

Get number of import modules.

◆ get_import_module_name()

idaman bool ida_export get_import_module_name ( qstring * buf,
int mod_index )

Get import module name.

Return values
trueok
falsebad index

◆ enum_import_names()

idaman int ida_export enum_import_names ( int mod_index,
import_enum_cb_t * callback,
void * param = nullptr )

Enumerate imports from specific module.

Return values
1finished ok
-1error
othercallback return value (<=0)

◆ delete_imports()

idaman void ida_export delete_imports ( void )

Delete all imported modules information.

◆ validate_idb_names()

idaman int ida_export validate_idb_names ( bool do_repair)

Check consistency of name records, return number of bad ones.

◆ set_gotea()

void set_gotea ( ea_t gotea)
inline

◆ get_gotea()

ea_t get_gotea ( void )
inline