hexrays.hpp File Reference

HexRays SDK header file. More...

Go to the source code of this file.

Classes

struct  optinsn_t
 User defined callbacks to optimize individual microcode instructions. More...
 
struct  optblock_t
 User defined callbacks to optimize microcode blocks. More...
 
struct  operand_locator_t
 Operand locator. More...
 
struct  number_format_t
 Number represenation. More...
 
struct  vd_printer_t
 Base helper class to convert binary data structures into text. More...
 
struct  vc_printer_t
 Helper class to convert cfunc_t into text. More...
 
struct  file_printer_t
 Helper class to convert binary data structures into text and put into a file. More...
 
struct  qstring_printer_t
 Helper class to convert cfunc_t into a text string. More...
 
class  vdloc_t
 
struct  lvar_locator_t
 Local variable locator. Local variables are located using: definition ea, location. More...
 
class  lvar_t
 Definition of a local variable (register or stack) #var #lvar. More...
 
struct  lvars_t
 Set of local variables. More...
 
struct  lvar_saved_info_t
 Saved user settings for local variables: name, type, comment. More...
 
struct  lvar_uservec_t
 All user-defined information about local variables. More...
 
struct  user_lvar_modifier_t
 Helper class to modify saved local variable settings. More...
 
struct  udcall_t
 User-defined function calls. More...
 
struct  microcode_filter_t
 Generic microcode generator class. More...
 
class  udc_filter_t
 Abstract class: User-defined call generator derived classes should implement method 'match'. More...
 
class  bitset_t
 Bit set class. More...
 
class  bitset_t::iterator
 
struct  ivl_t
 
class  ivlset_t
 
class  rlist_t
 
struct  mlist_t
 
class  simple_graph_t
 
struct  op_parent_info_t
 
struct  minsn_visitor_t
 
struct  mop_visitor_t
 
struct  srcop_visitor_t
 
struct  scif_visitor_t
 
struct  lvar_ref_t
 
struct  stkvar_ref_t
 
struct  mnumber_t
 
struct  scif_t
 
struct  fnumber_t
 Floating point constant. More...
 
class  mop_t
 
class  mop_pair_t
 
class  mop_addr_t
 
class  mfuncarg_t
 
class  mfuncinfo_t
 
class  mcases_t
 
class  chain_t
 
class  block_chains_t
 
struct  chain_visitor_t
 
class  graph_chains_t
 
class  minsn_t
 
class  mblock_t
 
struct  hexwarn_t
 
struct  mba_ranges_t
 Ranges to decompile. Either a function, either explicit vector of ranges. More...
 
struct  range_item_iterator_t
 Item iterator of arbitrary rangevec items. More...
 
struct  mba_item_iterator_t
 Item iterator for mba_ranges_t. More...
 
struct  range_chunk_iterator_t
 Chunk iterator of arbitrary rangevec items. More...
 
struct  mba_range_iterator_t
 Chunk iterator for mba_ranges_t. More...
 
class  mbl_array_t
 Micro block array (internal representation of the decompiled code). More...
 
class  chain_keeper_t
 
class  mbl_graph_t
 
class  codegen_t
 
struct  hexrays_failure_t
 Exception object: decompiler failure information. More...
 
struct  vd_failure_t
 Exception object: decompiler exception. More...
 
struct  vd_interr_t
 Exception object: decompiler internal error. More...
 
struct  operator_info_t
 Information about C operator. More...
 
struct  cnumber_t
 An immediate number. More...
 
struct  var_ref_t
 Reference to a local variable. More...
 
struct  ctree_visitor_t
 A generic helper class that is used for ctree traversal. More...
 
struct  ctree_parentee_t
 A helper ctree traversal class that maintains parent information. More...
 
struct  cfunc_parentee_t
 Class to traverse the whole function. More...
 
struct  treeloc_t
 Ctree location. Used to denote comment locations. More...
 
struct  citem_cmt_t
 Ctree item comment. More...
 
struct  citem_locator_t
 Generic ctree element locator. More...
 
struct  citem_t
 Basic ctree element. More...
 
struct  cexpr_t
 Ctree element: expression. More...
 
struct  ceinsn_t
 Statement with an expression. More...
 
struct  cif_t
 If statement. More...
 
struct  cloop_t
 Base class for loop statements. More...
 
struct  cfor_t
 For-loop. More...
 
struct  cwhile_t
 While-loop. More...
 
struct  cdo_t
 Do-loop. More...
 
struct  creturn_t
 Return statement. More...
 
struct  cgoto_t
 Goto statement. More...
 
struct  casm_t
 asm statement More...
 
struct  cinsn_t
 Ctree element: statement. More...
 
struct  cblock_t
 Compound statement (curly braces) More...
 
struct  carg_t
 Function argument. More...
 
struct  carglist_t
 Function argument list. More...
 
struct  ccase_t
 Switch case. Usually cinsn_t is a block. More...
 
struct  ccases_t
 Vector of switch cases. More...
 
struct  cswitch_t
 Switch statement. More...
 
struct  ctree_anchor_t
 Invisible COLOR_ADDR tags in the output text are used to refer to ctree items and variables. More...
 
struct  ctree_item_t
 Cursor item. More...
 
struct  cfunc_t
 Decompiled function. Decompilation result is kept here. More...
 
struct  ctext_position_t
 Cursor position in the output text (pseudocode). More...
 
struct  history_item_t
 Navigation history item. More...
 
struct  vdui_t
 Information about pseudocode window. More...
 
struct  user_numforms_iterator_t
 Iterator class for user_numforms_t. More...
 
struct  lvar_mapping_iterator_t
 
struct  udcall_map_iterator_t
 
struct  user_cmts_iterator_t
 Iterator class for user_cmts_t. More...
 
struct  user_iflags_iterator_t
 
struct  user_unions_iterator_t
 
struct  user_labels_iterator_t
 Iterator class for user_labels_t. More...
 
struct  eamap_iterator_t
 
struct  boundaries_iterator_t
 
struct  block_chains_iterator_t
 

Macros

#define CHECKED_BUILD
 
#define hexapi
 Public functions are marked with this keyword.
 
#define MAX_SUPPORTED_STACK_SIZE   0x100000
 
#define m_max   0x49
 
#define DECLARE_COMPARISON_OPERATORS(type)
 Macro to declare standard inline comparison operators. More...
 
#define DECLARE_COMPARISONS(type)
 Macro to declare comparisons for our classes All comparison operators call the compare() function which returns -1/0/1. More...
 
#define NF_FIXED   0x01
 number format has been defined by the user
 
#define NF_NEGDONE   0x02
 temporary internal bit: negation has been performed
 
#define NF_BINVDONE   0x04
 temporary internal bit: inverting bits is done
 
#define NF_NEGATE   0x08
 The user asked to negate the constant.
 
#define NF_BITNOT   0x10
 The user asked to invert bits of the constant.
 
#define NF_STROFF   0x20
 internal bit: used as stroff, valid iff is_stroff()
 
#define CVAR_USED   0x0001
 is used in the code?
 
#define CVAR_TYPE   0x0002
 the type is defined?
 
#define CVAR_NAME   0x0004
 has nice name?
 
#define CVAR_MREG   0x0008
 corresponding mregs were replaced?
 
#define CVAR_NOWD   0x0010
 width is unknown
 
#define CVAR_UNAME   0x0020
 user-defined name
 
#define CVAR_UTYPE   0x0040
 user-defined type
 
#define CVAR_RESULT   0x0080
 function result variable
 
#define CVAR_ARG   0x0100
 function argument
 
#define CVAR_FAKE   0x0200
 fake return variable
 
#define CVAR_OVER   0x0400
 overlapping variable
 
#define CVAR_FLOAT   0x0800
 used in a fpu insn
 
#define CVAR_SPOILED   0x1000
 internal flag, do not use: spoiled var
 
#define CVAR_MAPDST   0x2000
 other variables are mapped to this var
 
#define CVAR_PARTIAL   0x4000
 variable type is partialy defined
 
#define SVW_INT   0x00
 
#define SVW_FLOAT   0x01
 
#define SVW_SOFT   0x02
 
#define LVINF_KEEP   0x0001
 keep saved user settings regardless of vars
 
#define ULV_PRECISE_DEFEA   0x0001
 Use precise defea's for lvar locations.
 
#define ALLMEM   ivl_t::allmem
 
#define SHINS_NUMADDR   0x01
 
#define SHINS_VALNUM   0x02
 
#define SHINS_SHORT   0x04
 
#define SHINS_LDXEA   0x08
 
#define OPROP_IMPDONE   0x01
 
#define OPROP_UDT   0x02
 
#define OPROP_FLOAT   0x04
 
#define OPROP_CCFLAGS   0x08
 
#define FUNC_NAME_MEMCPY   "memcpy"
 
#define FUNC_NAME_MEMSET   "memset"
 
#define FUNC_NAME_MEMSET32   "memset32"
 
#define FUNC_NAME_MEMSET64   "memset64"
 
#define FUNC_NAME_STRCPY   "strcpy"
 
#define FUNC_NAME_STRLEN   "strlen"
 
#define FUNC_NAME_STRCAT   "strcat"
 
#define FUNC_NAME_TAIL   "tail"
 
#define FUNC_NAME_VA_ARG   "va_arg"
 
#define FUNC_NAME_EMPTY   "$empty"
 
#define FUNC_NAME_PRESENT   "$present"
 
#define FUNC_NAME_CONTAINING_RECORD   "CONTAINING_RECORD"
 
#define MAX_FUNC_ARGS   64
 
#define FCI_PROP   0x01
 
#define FCI_DEAD   0x02
 
#define FCI_FINAL   0x04
 
#define FCI_NORET   0x08
 
#define FCI_PURE   0x10
 
#define FCI_SPLOK   0x20
 
#define FCI_NOSIDE   0x40
 
#define CHF_INITED   0x01
 
#define CHF_STKVAR   0x02
 
#define CHF_REPLACED   0x04
 
#define CHF_OVER   0x08
 
#define CHF_FAKE   0x10
 
#define CHF_PASSTHRU   0x20
 
#define CHF_TERM   0x40
 
#define SIZEOF_BLOCK_CHAINS   56
 
#define GCA_EMPTY   0x01
 
#define GCA_SPEC   0x02
 
#define GCA_ALLOC   0x04
 
#define GCA_NALLOC   0x08
 
#define GCA_OFIRST   0x10
 
#define GCA_OLAST   0x20
 
#define IPROP_OPTIONAL   0x0001
 
#define IPROP_PERSIST   0x0002
 
#define IPROP_WILDMATCH   0x0004
 
#define IPROP_CLNPOP   0x0008
 
#define IPROP_FPINSN   0x0010
 
#define IPROP_FARCALL   0x0020
 
#define IPROP_TAILCALL   0x0040
 
#define IPROP_ASSERT   0x0080
 
#define IPROP_SPLIT   0x0700
 
#define IPROP_SPLIT1   0x0100
 
#define IPROP_SPLIT2   0x0200
 
#define IPROP_SPLIT4   0x0300
 
#define IPROP_SPLIT8   0x0400
 
#define IPROP_COMBINED   0x0800
 
#define IPROP_EXTSTX   0x1000
 
#define IPROP_IGNLOWSRC   0x2000
 
#define IPROP_INV_JX   0x4000
 
#define IPROP_WAS_NORET   0x8000
 
#define IPROP_MULTI_MOV   0x10000
 
#define IPROP_DONT_PROP   0x20000
 
#define IPROP_DONT_COMB   0x40000
 
#define OPTI_ADDREXPRS   0x0001
 
#define OPTI_MINSTKREF   0x0002
 
#define EQ_IGNSIZE   0x0001
 
#define EQ_IGNCODE   0x0002
 
#define EQ_CMPDEST   0x0004
 
#define EQ_OPTINSN   0x0008
 
#define MBL_PRIV   0x0001
 
#define MBL_NONFAKE   0x0000
 
#define MBL_FAKE   0x0002
 
#define MBL_GOTO   0x0004
 
#define MBL_TCAL   0x0008
 
#define MBL_PUSH   0x0010
 
#define MBL_DMT64   0x0020
 
#define MBL_COMB   0x0040
 
#define MBL_PROP   0x0080
 
#define MBL_DEAD   0x0100
 
#define MBL_LIST   0x0200
 
#define MBL_INCONST   0x0400
 
#define MBL_CALL   0x0800
 
#define MBL_BACKPROP   0x1000
 
#define MBL_NORET   0x2000
 
#define MAXRANGE   bitrange_t(0, USHRT_MAX)
 
#define FD_BACKWARD   0x0000
 
#define FD_FORWARD   0x0001
 
#define FD_USE   0x0000
 
#define FD_DEF   0x0002
 
#define FD_DIRTY   0x0004
 
#define NALT_VD   2
 
#define LOCOPT_ALL   0x0001
 
#define LOCOPT_REFINE   0x0002
 
#define LOCOPT_REFINE2   0x0004
 
#define ACFL_LOCOPT   0x01
 
#define ACFL_BLKOPT   0x02
 
#define ACFL_GLBPROP   0x04
 
#define ACFL_GLBDEL   0x08
 
#define ACFL_GUESS   0x10
 
#define VDRUN_NEWFILE   0x0000
 Create a new file or overwrite existing file.
 
#define VDRUN_APPEND   0x0001
 Create a new file or append to existing file.
 
#define VDRUN_ONLYNEW   0x0002
 Fail if output file already exists.
 
#define VDRUN_SILENT   0x0004
 Silent decompilation.
 
#define VDRUN_SENDIDB   0x0008
 Send problematic databases to hex-rays.com.
 
#define VDRUN_MAYSTOP   0x0010
 the user can cancel decompilation
 
#define VDRUN_CMDLINE   0x0020
 called from ida's command line
 
#define VDRUN_STATS   0x0040
 print statistics into vd_stats.txt
 
#define CV_FAST   0x0000
 do not maintain parent information
 
#define CV_PRUNE   0x0001
 this bit is set by visit...() to prune the walk
 
#define CV_PARENTS   0x0002
 maintain parent information
 
#define CV_POST   0x0004
 call the leave...() functions
 
#define CV_RESTART   0x0008
 restart enumeration at the top expr (apply_to_exprs)
 
#define CV_INSNS   0x0010
 visit only statements, prune all expressions More...
 
#define EXFL_CPADONE   0x0001
 pointer arithmetic correction done
 
#define EXFL_LVALUE   0x0002
 expression is lvalue even if it doesn't look like it
 
#define EXFL_FPOP   0x0004
 floating point operation
 
#define EXFL_ALONE   0x0008
 standalone helper
 
#define EXFL_CSTR   0x0010
 string literal
 
#define EXFL_PARTIAL   0x0020
 type of the expression is considered partial
 
#define EXFL_ALL   0x003F
 all currently defined bits
 
#define CFL_FINAL   0x0001
 call type is final, should not be changed
 
#define CFL_HELPER   0x0002
 created from a decompiler helper function
 
#define ANCHOR_INDEX   0x1FFFFFFF
 
#define ANCHOR_MASK   0xC0000000
 
#define ANCHOR_CITEM   0x00000000
 c-tree item
 
#define ANCHOR_LVAR   0x40000000
 declaration of local variable
 
#define ANCHOR_ITP   0x80000000
 item type preciser
 
#define ANCHOR_BLKCMT   0x20000000
 block comment (for ctree items)
 
#define GLN_CURRENT   0x01
 get label of the current item
 
#define GLN_GOTO_TARGET   0x02
 get goto target
 
#define GLN_ALL   0x03
 get both
 
#define INS_EPILOG   ((cinsn_t *)1)
 
#define CIT_COLLAPSED   0x0001
 display element in collapsed form
 
#define CFS_BOUNDS   0x0001
 'eamap' and 'boundaries' are ready
 
#define CFS_TEXT   0x0002
 'sv' is ready (and hdrlines)
 
#define CFS_LVARS_HIDDEN   0x0004
 local variable definitions are collapsed
 
#define DECOMP_NO_WAIT   0x0001
 do not display waitbox
 
#define DECOMP_NO_CACHE   0x0002
 do not use decompilation cache
 
#define DECOMP_NO_FRAME   0x0004
 do not use function frame info (only snippet mode)
 
#define VDUI_VISIBLE   0x0001
 is visible?
 
#define VDUI_VALID   0x0002
 is valid?
 
#define VDUI_LOCKED   0x0004
 is locked?
 

Typedefs

typedef int mreg_t
 Micro register.
 
typedef std::set< ea_t > easet_t
 
typedef std::set< minsn_t * > minsn_ptr_set_t
 
typedef std::set< qstring > strings_t
 
typedef qvector< minsn_t * > minsnptrs_t
 
typedef qvector< mop_t * > mopptrs_t
 
typedef qvector< mop_tmopvec_t
 
typedef qvector< uint64 > uint64vec_t
 
typedef qvector< mreg_tmregvec_t
 
typedef int maymust_t
 
typedef std::map< operand_locator_t, number_format_tuser_numforms_t
 
typedef qvector< lvar_saved_info_tlvar_saved_infos_t
 
typedef std::map< lvar_locator_t, lvar_locator_tlvar_mapping_t
 Local variable mapping (is used to merge variables)
 
typedef std::map< ea_t, udcall_tudcall_map_t
 
typedef int mbitmap_t
 
typedef qvector< bitset_tarray_of_bitsets
 
typedef qvector< ivlset_tarray_of_ivlsets
 
typedef qvector< mlist_tmlistvec_t
 
typedef uint8 mopt_t
 
typedef qvector< mfuncarg_tmfuncargs_t
 
typedef qvector< hexwarn_thexwarns_t
 
typedef qvector< citem_t * > ctree_items_t
 Vector of parents.
 
typedef ctree_items_t parents_t
 
typedef std::map< treeloc_t, citem_cmt_tuser_cmts_t
 
typedef std::map< citem_locator_t, int32 > user_iflags_t
 
typedef std::map< ea_t, intvec_t > user_unions_t
 
typedef qvector< cinsn_t * > cinsnptrvec_t
 Vector of pointers to statements.
 
typedef std::map< int, qstring > user_labels_t
 
typedef std::map< ea_t, cinsnptrvec_teamap_t
 
typedef std::map< cinsn_t *, rangeset_t > boundaries_t
 
typedef qrefcnt_t< cfunc_tcfuncptr_t
 
typedef void * hexdsp_t(int code,...)
 Hex-Rays decompiler dispatcher. More...
 
typedef ssize_t hexrays_cb_t(void *ud, hexrays_event_t event, va_list va)
 Handler of decompiler events. More...
 
typedef qstack< history_item_thistory_t
 Navigation history.
 
typedef int cmt_type_t
 Comment types.
 
typedef size_t iterator_word
 

Enumerations

enum  access_type_t { NO_ACCESS = 0, WRITE_ACCESS = 1, READ_ACCESS = 2, RW_ACCESS = WRITE_ACCESS | READ_ACCESS }
 
enum  merror_t {
  MERR_OK = 0, MERR_BLOCK = 1, MERR_INTERR = -1, MERR_INSN = -2,
  MERR_MEM = -3, MERR_BADBLK = -4, MERR_BADSP = -5, MERR_PROLOG = -6,
  MERR_SWITCH = -7, MERR_EXCEPTION = -8, MERR_HUGESTACK = -9, MERR_LVARS = -10,
  MERR_BITNESS = -11, MERR_BADCALL = -12, MERR_BADFRAME = -13, MERR_UNKTYPE = -14,
  MERR_BADIDB = -15, MERR_SIZEOF = -16, MERR_REDO = -17, MERR_CANCELED = -18,
  MERR_RECDEPTH = -19, MERR_OVERLAP = -20, MERR_PARTINIT = -21, MERR_COMPLEX = -22,
  MERR_LICENSE = -23, MERR_ONLY32 = -24, MERR_ONLY64 = -25, MERR_BUSY = -26,
  MERR_FARPTR = -27, MERR_EXTERN = -28, MERR_FUNCSIZE = -29, MERR_BADRANGES = -30,
  MERR_STOP = -31, MERR_MAX_ERR = 31, MERR_LOOP = -32
}
 
enum  mcode_t {
  m_nop = 0x00, m_stx = 0x01, m_ldx = 0x02, m_ldc = 0x03,
  m_mov = 0x04, m_neg = 0x05, m_lnot = 0x06, m_bnot = 0x07,
  m_xds = 0x08, m_xdu = 0x09, m_low = 0x0A, m_high = 0x0B,
  m_add = 0x0C, m_sub = 0x0D, m_mul = 0x0E, m_udiv = 0x0F,
  m_sdiv = 0x10, m_umod = 0x11, m_smod = 0x12, m_or = 0x13,
  m_and = 0x14, m_xor = 0x15, m_shl = 0x16, m_shr = 0x17,
  m_sar = 0x18, m_cfadd = 0x19, m_ofadd = 0x1A, m_cfshl = 0x1B,
  m_cfshr = 0x1C, m_sets = 0x1D, m_seto = 0x1E, m_setp = 0x1F,
  m_setnz = 0x20, m_setz = 0x21, m_setae = 0x22, m_setb = 0x23,
  m_seta = 0x24, m_setbe = 0x25, m_setg = 0x26, m_setge = 0x27,
  m_setl = 0x28, m_setle = 0x29, m_jcnd = 0x2A, m_jnz = 0x2B,
  m_jz = 0x2C, m_jae = 0x2D, m_jb = 0x2E, m_ja = 0x2F,
  m_jbe = 0x30, m_jg = 0x31, m_jge = 0x32, m_jl = 0x33,
  m_jle = 0x34, m_jtbl = 0x35, m_ijmp = 0x36, m_goto = 0x37,
  m_call = 0x38, m_icall = 0x39, m_ret = 0x3A, m_push = 0x3B,
  m_pop = 0x3C, m_und = 0x3D, m_ext = 0x3E, m_f2i = 0x3F,
  m_f2u = 0x40, m_i2f = 0x41, m_u2f = 0x42, m_f2f = 0x43,
  m_fneg = 0x44, m_fadd = 0x45, m_fsub = 0x46, m_fmul = 0x47,
  m_fdiv = 0x48
}
 
enum  type_source_t {
  GUESSED_NONE, GUESSED_WEAK, GUESSED_FUNC, GUESSED_DATA,
  TS_NOELL = 0x8000000, TS_SHRINK = 0x4000000, TS_MASK = 0xC000000
}
 Type source (where the type information comes from)
 
enum  side_effect_t { NO_SIDEFF, WITH_SIDEFF, ONLY_SIDEFF, ANY_REGSIZE = 0x80 }
 
enum  funcrole_t {
  ROLE_UNK, ROLE_EMPTY, ROLE_MEMSET, ROLE_MEMSET32,
  ROLE_MEMSET64, ROLE_MEMCPY, ROLE_STRCPY, ROLE_STRLEN,
  ROLE_STRCAT, ROLE_TAIL, ROLE_BUG, ROLE_JUMPOUT,
  ROLE_ALLOCA, ROLE_BSWAP, ROLE_PRESENT, ROLE_CONTAINING_RECORD,
  ROLE_FASTFAIL, ROLE_READFLAGS, ROLE_IS_MUL_OK, ROLE_SATURATED_MUL,
  ROLE_BITTEST, ROLE_BITTESTANDSET, ROLE_BITTESTANDRESET, ROLE_BITTESTANDCOMPLEMENT,
  ROLE_VA_ARG, ROLE_VA_COPY, ROLE_VA_START, ROLE_VA_END,
  ROLE_ROL, ROLE_ROR
}
 
enum  vrcode_t { VRC_FAILED = -1, VRC_OK = 0, VRC_NONE = 1 }
 
enum  mblock_type_t {
  BLT_NONE = 0, BLT_STOP = 1, BLT_0WAY = 2, BLT_1WAY = 3,
  BLT_2WAY = 4, BLT_NWAY = 5
}
 
enum  warnid_t {
  WARN_VARARG_REGS, WARN_ILL_PURGED, WARN_ILL_FUNCTYPE, WARN_VARARG_TCAL,
  WARN_VARARG_NOSTK, WARN_VARARG_MANY, WARN_ADDR_OUTARGS, WARN_DEP_UNK_CALLS,
  WARN_ILL_ELLIPSIS, WARN_GUESSED_TYPE, WARN_EXP_LINVAR, WARN_WIDEN_CHAINS,
  WARN_BAD_PURGED, WARN_CBUILD_LOOPS, WARN_NO_SAVE_REST, WARN_ODD_INPUT_REG,
  WARN_ODD_ADDR_USE, WARN_MUST_RET_FP, WARN_ILL_FPU_STACK, WARN_SELFREF_PROP,
  WARN_WOULD_OVERLAP, WARN_ARRAY_INARG, WARN_MAX_ARGS, WARN_BAD_FIELD_TYPE,
  WARN_WRITE_CONST, WARN_BAD_RETVAR, WARN_FRAG_LVAR, WARN_HUGE_STKOFF,
  WARN_UNINITED_REG, WARN_FIXED_MACRO, WARN_WRONG_VA_OFF, WARN_CR_NOFIELD,
  WARN_CR_BADOFF, WARN_BAD_STROFF, WARN_BAD_VARSIZE, WARN_UNSUPP_REG,
  WARN_UNALIGNED_ARG, WARN_BAD_STD_TYPE, WARN_BAD_CALL_SP, WARN_MISSED_SWITCH,
  WARN_BAD_SP, WARN_BAD_STKPNT, WARN_MAX
}
 
enum  mba_maturity_t {
  MMAT_ZERO, MMAT_GENERATED, MMAT_PREOPTIMIZED, MMAT_LOCOPT,
  MMAT_CALLS, MMAT_GLBOPT1, MMAT_GLBOPT2, MMAT_GLBOPT3,
  MMAT_LVARS
}
 Microcode maturity levels. More...
 
enum  gctype_t {
  GC_ONLY_REGS, GC_REGS_AND_STKVARS, GC_ASR, GC_XDSU,
  GC_END, GC_DIRTY_ALL = (1 << (2*GC_END))-1
}
 
enum  ctype_t {
  cot_empty = 0, cot_comma = 1, cot_asg = 2, cot_asgbor = 3,
  cot_asgxor = 4, cot_asgband = 5, cot_asgadd = 6, cot_asgsub = 7,
  cot_asgmul = 8, cot_asgsshr = 9, cot_asgushr = 10, cot_asgshl = 11,
  cot_asgsdiv = 12, cot_asgudiv = 13, cot_asgsmod = 14, cot_asgumod = 15,
  cot_tern = 16, cot_lor = 17, cot_land = 18, cot_bor = 19,
  cot_xor = 20, cot_band = 21, cot_eq = 22, cot_ne = 23,
  cot_sge = 24, cot_uge = 25, cot_sle = 26, cot_ule = 27,
  cot_sgt = 28, cot_ugt = 29, cot_slt = 30, cot_ult = 31,
  cot_sshr = 32, cot_ushr = 33, cot_shl = 34, cot_add = 35,
  cot_sub = 36, cot_mul = 37, cot_sdiv = 38, cot_udiv = 39,
  cot_smod = 40, cot_umod = 41, cot_fadd = 42, cot_fsub = 43,
  cot_fmul = 44, cot_fdiv = 45, cot_fneg = 46, cot_neg = 47,
  cot_cast = 48, cot_lnot = 49, cot_bnot = 50, cot_ptr = 51,
  cot_ref = 52, cot_postinc = 53, cot_postdec = 54, cot_preinc = 55,
  cot_predec = 56, cot_call = 57, cot_idx = 58, cot_memref = 59,
  cot_memptr = 60, cot_num = 61, cot_fnum = 62, cot_str = 63,
  cot_obj = 64, cot_var = 65, cot_insn = 66, cot_sizeof = 67,
  cot_helper = 68, cot_type = 69, cot_last = cot_type, cit_empty = 70,
  cit_block = 71, cit_expr = 72, cit_if = 73, cit_for = 74,
  cit_while = 75, cit_do = 76, cit_switch = 77, cit_break = 78,
  cit_continue = 79, cit_return = 80, cit_goto = 81, cit_asm = 82,
  cit_end
}
 Ctree element type. More...
 
enum  ctree_maturity_t {
  CMAT_ZERO, CMAT_BUILT, CMAT_TRANS1, CMAT_NICE,
  CMAT_TRANS2, CMAT_CPA, CMAT_TRANS3, CMAT_CASTED,
  CMAT_FINAL
}
 Ctree maturity level. More...
 
enum  item_preciser_t {
  ITP_EMPTY, ITP_ARG1, ITP_ARG64 = ITP_ARG1+63, ITP_BRACE1,
  ITP_INNER_LAST = ITP_BRACE1, ITP_ASM, ITP_ELSE, ITP_DO,
  ITP_SEMI, ITP_CURLY1, ITP_CURLY2, ITP_BRACE2,
  ITP_COLON, ITP_BLOCK1, ITP_BLOCK2, ITP_CASE = 0x40000000,
  ITP_SIGN = 0x20000000
}
 Comment item preciser. More...
 
enum  cmt_retrieval_type_t { RETRIEVE_ONCE, RETRIEVE_ALWAYS }
 Comment retrieval type. More...
 
enum  use_curly_t { CALC_CURLY_BRACES, NO_CURLY_BRACES, USE_CURLY_BRACES }
 Should curly braces be printed? More...
 
enum  cursor_item_type_t {
  VDI_NONE, VDI_EXPR, VDI_LVAR, VDI_FUNC,
  VDI_TAIL
}
 Type of the cursor item. More...
 
enum  allow_unused_labels_t { FORBID_UNUSED_LABELS = 0, ALLOW_UNUSED_LABELS = 1 }
 Unused label disposition. More...
 
enum  hexrays_event_t {
  hxe_flowchart, hxe_stkpnts, hxe_prolog, hxe_microcode,
  hxe_preoptimized, hxe_locopt, hxe_prealloc, hxe_glbopt,
  hxe_structural, hxe_maturity, hxe_interr, hxe_combine,
  hxe_print_func, hxe_func_printed, hxe_resolve_stkaddrs, hxe_open_pseudocode =100,
  hxe_switch_pseudocode, hxe_refresh_pseudocode, hxe_close_pseudocode, hxe_keyboard,
  hxe_right_click, hxe_double_click, hxe_curpos, hxe_create_hint,
  hxe_text_ready, hxe_populating_popup, lxe_lvar_name_changed, lxe_lvar_type_changed,
  lxe_lvar_cmt_changed, lxe_lvar_mapping_changed
}
 Decompiler events. More...
 
enum  input_device_t { USE_KEYBOARD = 0, USE_MOUSE = 1 }
 Type of the input device. More...
 
enum  hexcall_t {
  hx_user_cmts_begin, hx_user_cmts_end, hx_user_cmts_next, hx_user_cmts_prev,
  hx_user_cmts_first, hx_user_cmts_second, hx_user_cmts_find, hx_user_cmts_insert,
  hx_user_cmts_erase, hx_user_cmts_clear, hx_user_cmts_size, hx_user_cmts_free,
  hx_user_numforms_begin, hx_user_numforms_end, hx_user_numforms_next, hx_user_numforms_prev,
  hx_user_numforms_first, hx_user_numforms_second, hx_user_numforms_find, hx_user_numforms_insert,
  hx_user_numforms_erase, hx_user_numforms_clear, hx_user_numforms_size, hx_user_numforms_free,
  hx_user_iflags_begin, hx_user_iflags_end, hx_user_iflags_next, hx_user_iflags_prev,
  hx_user_iflags_first, hx_user_iflags_second, hx_user_iflags_find, hx_user_iflags_insert,
  hx_user_iflags_erase, hx_user_iflags_clear, hx_user_iflags_size, hx_user_iflags_free,
  hx_user_labels_begin, hx_user_labels_end, hx_user_labels_next, hx_user_labels_prev,
  hx_user_labels_first, hx_user_labels_second, hx_user_labels_find, hx_user_labels_insert,
  hx_user_labels_erase, hx_user_labels_clear, hx_user_labels_size, hx_user_labels_free,
  hx_operand_locator_t_compare, hx_vd_printer_t_print, hx_qstring_printer_t_print, hx_remove_typedef,
  hx_is_type_correct, hx_is_type_integral, hx_is_type_small_struni, hx_partial_type_num,
  hx_get_float_bit, hx_typestring_print, hx_typestring_change_sign, hx_typestring_get_cc,
  hx_typestring_get_nth_arg, hx_get_int_type_by_width_and_sign, hx_get_unk_type, hx_get_member_type,
  hx_make_array, hx_make_pointer, hx_create_typedef, hx_remove_pointer,
  hx_cnv_array_to_ptr, hx_strtype_info_t_build_base_type, hx_strtype_info_t_build_udt_type, hx_arglocs_overlap,
  hx_lvar_locator_t_get_regnum, hx_lvar_locator_t_compare, hx_lvar_t_accepts_type, hx_lvar_t_set_lvar_type,
  hx_lvar_t_set_width, hx_lvars_t_find_stkvar, hx_lvars_t_find, hx_lvars_t_find_lvar,
  hx_restore_user_lvar_settings, hx_save_user_lvar_settings, hx_fnumber_t_print, hx_get_hexrays_version,
  hx_open_pseudocode, hx_close_pseudocode, hx_decompile, hx_decompile_many,
  hx_micro_err_format, hx_hexrays_failure_t_desc, hx_send_database, hx_negated_relation,
  hx_get_op_signness, hx_asgop, hx_asgop_revert, hx_cnumber_t_print,
  hx_cnumber_t_value, hx_cnumber_t_assign, hx_cnumber_t_compare, hx_var_ref_t_compare,
  hx_ctree_visitor_t_apply_to, hx_ctree_visitor_t_apply_to_exprs, hx_ctree_parentee_t_recalc_parent_types, hx_cfunc_parentee_t_calc_rvalue_type,
  hx_citem_locator_t_compare, hx_citem_t_contains_label, hx_citem_t_find_parent_of, hx_cexpr_t_assign,
  hx_cexpr_t_compare, hx_cexpr_t_replace_by, hx_cexpr_t_cleanup, hx_cexpr_t_put_number,
  hx_cexpr_t_print1, hx_cexpr_t_calc_type, hx_cexpr_t_equal_effect, hx_cexpr_t_is_child_of,
  hx_cexpr_t_contains_operator, hx_cexpr_t_get_high_nbit_bound, hx_cexpr_t_requires_lvalue, hx_cexpr_t_has_side_effects,
  hx_cif_t_assign, hx_cif_t_compare, hx_cloop_t_assign, hx_cfor_t_compare,
  hx_cwhile_t_compare, hx_cdo_t_compare, hx_creturn_t_compare, hx_cgoto_t_compare,
  hx_casm_t_compare, hx_cinsn_t_assign, hx_cinsn_t_compare, hx_cinsn_t_replace_by,
  hx_cinsn_t_cleanup, hx_cinsn_t_new_insn, hx_cinsn_t_create_if, hx_cinsn_t_print,
  hx_cinsn_t_print1, hx_cinsn_t_is_ordinary_flow, hx_cinsn_t_contains_insn, hx_cinsn_t_collect_free_breaks,
  hx_cinsn_t_collect_free_continues, hx_cblock_t_compare, hx_carglist_t_compare, hx_ccase_t_compare,
  hx_ccases_t_compare, hx_cswitch_t_compare, hx_ctree_item_t_get_memptr, hx_ctree_item_t_get_lvar,
  hx_ctree_item_t_get_ea, hx_ctree_item_t_get_label_num, hx_lnot, hx_new_block,
  hx_vcreate_helper, hx_vcall_helper, hx_make_num, hx_make_ref,
  hx_dereference, hx_save_user_labels, hx_save_user_cmts, hx_save_user_numforms,
  hx_save_user_iflags, hx_restore_user_labels, hx_restore_user_cmts, hx_restore_user_numforms,
  hx_restore_user_iflags, hx_cfunc_t_build_c_tree, hx_cfunc_t_verify, hx_cfunc_t_print_dcl,
  hx_cfunc_t_print_func, hx_cfunc_t_get_func_type, hx_cfunc_t_get_lvars, hx_cfunc_t_find_label,
  hx_cfunc_t_remove_unused_labels, hx_cfunc_t_get_user_cmt, hx_cfunc_t_set_user_cmt, hx_cfunc_t_get_user_iflags,
  hx_cfunc_t_set_user_iflags, hx_cfunc_t_has_orphan_cmts, hx_cfunc_t_del_orphan_cmts, hx_cfunc_t_get_line_item,
  hx_cfunc_t_get_warnings, hx_cfunc_t_gather_derefs, hx_cfunc_t_cleanup, hx_get_ctype_name,
  hx_install_hexrays_callback, hx_remove_hexrays_callback, hx_vdui_t_refresh_view, hx_vdui_t_refresh_ctext,
  hx_vdui_t_switch_to, hx_vdui_t_get_number, hx_vdui_t_clear, hx_vdui_t_refresh_cpos,
  hx_vdui_t_get_current_item, hx_vdui_t_ui_rename_lvar, hx_vdui_t_rename_lvar, hx_vdui_t_ui_set_lvar_type,
  hx_vdui_t_set_lvar_type, hx_vdui_t_edit_lvar_cmt, hx_vdui_t_set_lvar_cmt, hx_vdui_t_set_strmem_type,
  hx_vdui_t_rename_strmem, hx_vdui_t_set_global_type, hx_vdui_t_rename_global, hx_vdui_t_rename_label,
  hx_vdui_t_jump_enter, hx_vdui_t_ctree_to_disasm, hx_vdui_t_push_current_location, hx_vdui_t_pop_current_location,
  hx_vdui_t_calc_cmt_type, hx_vdui_t_edit_cmt, hx_vdui_t_edit_func_cmt, hx_vdui_t_del_orphan_cmts,
  hx_vdui_t_set_num_radix, hx_vdui_t_set_num_enum, hx_vdui_t_set_num_stroff, hx_vdui_t_invert_sign,
  hx_vdui_t_collapse_item, hx_vdui_t_split_item, hx_vdui_t_set_vargloc_end, hx_lvar_mapping_begin,
  hx_lvar_mapping_end, hx_lvar_mapping_next, hx_lvar_mapping_prev, hx_lvar_mapping_first,
  hx_lvar_mapping_second, hx_lvar_mapping_find, hx_lvar_mapping_insert, hx_lvar_mapping_erase,
  hx_lvar_mapping_clear, hx_lvar_mapping_size, hx_lvar_mapping_free, hx_user_unions_begin,
  hx_user_unions_end, hx_user_unions_next, hx_user_unions_prev, hx_user_unions_first,
  hx_user_unions_second, hx_user_unions_find, hx_user_unions_insert, hx_user_unions_erase,
  hx_user_unions_clear, hx_user_unions_size, hx_user_unions_free, hx_strtype_info_t_create_from,
  hx_save_user_unions, hx_restore_user_unions, hx_cfunc_t_get_user_union_selection, hx_cfunc_t_set_user_union_selection,
  hx_vdui_t_ui_edit_lvar_cmt, hx_vdui_t_ui_map_lvar, hx_vdui_t_ui_unmap_lvar, hx_vdui_t_map_lvar,
  hx_dummy_ptrtype, hx_create_field_name, hx_dummy_plist_for, hx_make_dt,
  hx_cexpr_t_get_low_nbit_bound, hx_eamap_begin, hx_eamap_end, hx_eamap_next,
  hx_eamap_prev, hx_eamap_first, hx_eamap_second, hx_eamap_find,
  hx_eamap_insert, hx_eamap_erase, hx_eamap_clear, hx_eamap_size,
  hx_eamap_free, hx_boundaries_begin, hx_boundaries_end, hx_boundaries_next,
  hx_boundaries_prev, hx_boundaries_first, hx_boundaries_second, hx_boundaries_find,
  hx_boundaries_insert, hx_boundaries_erase, hx_boundaries_clear, hx_boundaries_size,
  hx_boundaries_free, hx_mark_cfunc_dirty, hx_clear_cached_cfuncs, hx_has_cached_cfunc,
  hx_cfunc_t_get_eamap, hx_cfunc_t_get_boundaries, hx_cfunc_t_get_pseudocode, hx_vdui_t_collapse_lvars,
  hx_vdui_t_invert_bits, hx_print_vdloc, hx_is_small_struni, hx_is_nonbool_type,
  hx_is_bool_type, hx_get_type, hx_set_type, hx_vdloc_t_compare,
  hx_get_float_type, hx_vdui_t_get_current_label, hx_get_widget_vdui, hx_cfunc_t_print_dcl2,
  hx_modify_user_lvars, hx_user_numforms_new, hx_lvar_mapping_new, hx_user_cmts_new,
  hx_user_iflags_new, hx_user_unions_new, hx_user_labels_new, hx_eamap_new,
  hx_boundaries_new, hx_restore_user_defined_calls, hx_save_user_defined_calls, hx_udcall_map_begin,
  hx_udcall_map_end, hx_udcall_map_next, hx_udcall_map_prev, hx_udcall_map_first,
  hx_udcall_map_second, hx_udcall_map_find, hx_udcall_map_insert, hx_udcall_map_erase,
  hx_udcall_map_clear, hx_udcall_map_size, hx_udcall_map_free, hx_udcall_map_new,
  hx_parse_user_call, hx_convert_to_user_call, hx_install_microcode_filter, hx_microcode_filter_t_match,
  hx_microcode_filter_t_apply, hx_udc_filter_t_apply, hx_udc_filter_t_match, hx_udc_filter_t_init,
  hx_cfunc_t_get_stkoff_delta, hx_negate_mcode_relation, hx_swap_mcode_relation, hx_get_signed_mcode,
  hx_get_unsigned_mcode, hx_is_dest_target_mcode, hx_bitset_t_has, hx_bitset_t_has_all,
  hx_bitset_t_has_any, hx_bitset_t_empty, hx_bitset_t_count, hx_bitset_t_last,
  hx_bitset_t_has_common, hx_bitset_t_is_subset_of, hx_bitset_t_includes, hx_bitset_t_compare,
  hx_bitset_t_goup, hx_ivl_t_print, hx_ivl_t_compare, hx_ivlset_t_print,
  hx_ivlset_t_count, hx_ivlset_t_has_common, hx_ivlset_t_contains, hx_ivlset_t_includes,
  hx_ivlset_t_compare, hx_get_mreg_name, hx_mlist_t_print, hx_mlist_t_compare,
  hx_lvar_ref_t_compare, hx_lvar_ref_t_var, hx_stkvar_ref_t_compare, hx_stkvar_ref_t_get_stkvar,
  hx_mop_t_copy, hx_mop_t_swap, hx_mop_t_erase, hx_mop_t_create_from_rlist,
  hx_mop_t_create_from_mlist, hx_mop_t_create_from_ivlset, hx_mop_t_create_from_vdloc, hx_mop_t_create_from_scattered_vdloc,
  hx_mop_t_create_from_insn, hx_mop_t_is01, hx_mop_t_make_helper, hx_mop_t_may_use_aliased_memory,
  hx_mop_t_has_side_effects, hx_mop_t_get_stkoff, hx_mop_t_assign, hx_mop_t_low_half,
  hx_mop_t_high_half, hx_mop_t_first_half, hx_mop_t_second_half, hx_mop_t_shift_mop,
  hx_mop_t_is_sign_extended_from, hx_mop_t_is_zero_extended_from, hx_mop_t_change_size, hx_mop_t_for_all_ops,
  hx_mcases_t_compare, hx_graph_chains_t_for_all_chains, hx_minsn_t_swap_nolist, hx_minsn_t_init,
  hx_minsn_t_copy, hx_minsn_t_setaddr, hx_minsn_t_optimize_subtree, hx_minsn_t_for_src_ops,
  hx_minsn_t_for_all_ops, hx_minsn_t_for_all_insns, hx_minsn_t__make_nop, hx_minsn_t_is_between,
  hx_minsn_t_equal_insns, hx_minsn_t_find_opcode, hx_minsn_t_find_ins_op, hx_minsn_t_find_num_op,
  hx_minsn_t_has_side_effects, hx_mblock_t_insert_into_block, hx_mblock_t_remove_from_block, hx_mblock_t_build_lists,
  hx_mblock_t_for_all_ops, hx_mblock_t_for_all_insns, hx_mblock_t_find_first_use, hx_mblock_t_find_redefinition,
  hx_mblock_t_is_rhs_redefined, hx_mblock_t_is_accessed, hx_mblock_t_for_all_uses, hx_mblock_t_find_access,
  hx_mbl_array_t_get_graph, hx_mbl_array_t_optimize_local, hx_mbl_array_t_optimize_global, hx_mbl_array_t_alloc_lvars,
  hx_mbl_array_t_for_all_ops, hx_mbl_array_t_for_all_insns, hx_mbl_array_t_for_all_topinsns, hx_mbl_array_t_remove_empty_blocks,
  hx_mbl_array_t_combine_blocks, hx_mbl_array_t_verify, hx_mbl_array_t_arg, hx_mbl_graph_t_is_accessed_globally,
  hx_mbl_graph_t_get_ud, hx_mbl_graph_t_get_du, hx_cfunc_t_find_item_coords, hx_vdui_t_ui_set_call_type,
  hx_rlist_t_print, hx_mop_t_print, hx_mfuncarg_t_print, hx_mfuncinfo_t_print,
  hx_chain_t_print, hx_block_chains_t_print, hx_minsn_t_print, hx_mblock_t_print_block_header,
  hx_mblock_t_append_use_list, hx_mblock_t_append_def_list, hx_mblock_t_build_use_list, hx_mblock_t_build_def_list,
  hx_mbl_array_t_term, hx_gen_microcode, hx_vdui_t_set_locked, hx_install_optinsn_handler,
  hx_remove_optinsn_handler, hx_install_optblock_handler, hx_remove_optblock_handler, hx_mop_t_make_number,
  hx_mop_t_make_fpnum, hx_mfuncarg_t_set_regarg, hx_minsn_t_find_call, hx_minsn_t_is_helper,
  hx_minsn_t_is_noret_call, hx_mop_t_create_pair, hx_getf_reginsn, hx_getb_reginsn,
  hx_mbl_array_t_make_chains_dirty, hx_reg2mreg, hx_mreg2reg, hx_mbl_array_t_build_graph,
  hx_get_merror_desc, hx_bitset_t_bitset_t, hx_bitset_t_add, hx_bitset_t_add_,
  hx_bitset_t_add__, hx_bitset_t_sub, hx_bitset_t_sub_, hx_bitset_t_sub__,
  hx_bitset_t_cut_at, hx_bitset_t_shift_down, hx_bitset_t_count_, hx_bitset_t_fill_with_ones,
  hx_bitset_t_intersect, hx_ivlset_t_add, hx_ivlset_t_add_, hx_ivlset_t_addmasked,
  hx_ivlset_t_sub, hx_ivlset_t_sub_, hx_ivlset_t_has_common_, hx_ivlset_t_intersect,
  hx_mlist_t_addmem, hx_mop_t_get_regnum, hx_block_chains_t_get_chain, hx_graph_chains_t_release,
  hx_mbl_array_t_analyze_calls, hx_vdloc_t_dstr, hx_lvar_locator_t_dstr, hx_lvar_t_dstr,
  hx_bitset_t_dstr, hx_ivl_t_dstr, hx_ivlset_t_dstr, hx_rlist_t_dstr,
  hx_mlist_t_dstr, hx_fnumber_t_dstr, hx_mop_t_dstr, hx_mfuncarg_t_dstr,
  hx_mcases_t_dstr, hx_chain_t_dstr, hx_block_chains_t_dstr, hx_minsn_t_dstr,
  hx_dstr, hx_dstr_, hx_mfuncinfo_t_dstr, hx_mbl_array_t_dump,
  hx_mblock_t_print, hx_mbl_array_t_print, hx_mblock_t_dump, hx_citem_t_find_closest_addr,
  hx_mblock_t_find_value_of, hx_mbl_array_t_serialize, hx_deserialize_mbl_array, hx_remitem,
  hx_block_chains_begin, hx_block_chains_end, hx_block_chains_next, hx_block_chains_prev,
  hx_block_chains_first, hx_block_chains_second, hx_block_chains_find, hx_block_chains_insert,
  hx_block_chains_erase, hx_block_chains_clear, hx_block_chains_size, hx_block_chains_free,
  hx_block_chains_new, hx_mblock_t_vdump_block, hx_mbl_array_t_vdump_mba, hx_file_printer_t_print
}
 API call numbers.
 

Functions

bool is_may_access (maymust_t maymust)
 
ea_t get_merror_desc (qstring *out, merror_t code, mbl_array_t *mba)
 Get textual description of an error code. More...
 
mreg_t reg2mreg (int reg)
 

Map a processor register to microregister. More...

 
int mreg2reg (mreg_t reg, int width)
 Map a microregister to processor register. More...
 
void install_optinsn_handler (optinsn_t *opt)
 
bool remove_optinsn_handler (optinsn_t *opt)
 
void install_optblock_handler (optblock_t *opt)
 
bool remove_optblock_handler (optblock_t *opt)
 
bool must_mcode_close_block (mcode_t opcode, bool including_calls)
 
bool is_mcode_propagatable (mcode_t mcode)
 
bool is_mcode_addsub (mcode_t mcode)
 
bool is_mcode_xdsu (mcode_t mcode)
 
bool is_mcode_set (mcode_t mcode)
 
bool is_mcode_set1 (mcode_t mcode)
 
bool is_mcode_j1 (mcode_t mcode)
 
bool is_mcode_jcond (mcode_t mcode)
 
bool is_mcode_convertible_to_jmp (mcode_t mcode)
 
bool is_mcode_convertible_to_set (mcode_t mcode)
 
bool is_mcode_call (mcode_t mcode)
 
bool is_mcode_fpu (mcode_t mcode)
 
bool is_mcode_commutative (mcode_t mcode)
 
bool is_mcode_shift (mcode_t mcode)
 
mcode_t set2jcnd (mcode_t code)
 
mcode_t jcnd2set (mcode_t code)
 
mcode_t negate_mcode_relation (mcode_t code)
 
mcode_t swap_mcode_relation (mcode_t code)
 
mcode_t get_signed_mcode (mcode_t code)
 
mcode_t get_unsigned_mcode (mcode_t code)
 
bool is_signed_mcode (mcode_t code)
 
bool is_unsigned_mcode (mcode_t code)
 
bool is_dest_target_mcode (mcode_t mcode)
 
bool is_type_correct (const type_t *ptr)
 Verify a type string. More...
 
bool is_small_struni (const tinfo_t &tif)
 Is a small structure or union? More...
 
bool is_nonbool_type (const tinfo_t &type)
 Is definitely a non-boolean type? More...
 
bool is_bool_type (const tinfo_t &type)
 Is a boolean type? More...
 
bool is_ptr_or_array (type_t t)
 Is a pointer or array type?
 
bool is_paf (type_t t)
 Is a pointer, array, or function type?
 
bool is_inplace_def (const tinfo_t &type)
 Is struct/union/enum definition (not declaration)?
 
int partial_type_num (const tinfo_t &type)
 Calculate number of partial subtypes. More...
 
tinfo_t get_float_type (int width)
 Get a type of a floating point value with the specified width. More...
 
tinfo_t get_int_type_by_width_and_sign (int srcwidth, type_sign_t sign)
 Create a type info by width and sign. More...
 
tinfo_t get_unk_type (int size)
 Create a partial type info by width. More...
 
tinfo_t dummy_ptrtype (int ptrsize, bool isfp)
 Generate a dummy pointer type. More...
 
bool get_member_type (const member_t *mptr, tinfo_t *type)
 Get type of a structure field. More...
 
tinfo_t make_pointer (const tinfo_t &type)
 Create a pointer type. More...
 
tinfo_t create_typedef (const char *name)
 Create a reference to a named type. More...
 
tinfo_t create_typedef (int n)
 Create a reference to an ordinal type. More...
 
int compare_typsrc (type_source_t s1, type_source_t s2)
 
bool get_type (uval_t id, tinfo_t *tif, type_source_t guess)
 Get a global type. More...
 
bool set_type (uval_t id, const tinfo_t &tif, type_source_t source, bool force=false)
 Set a global type. More...
 
void print_vdloc (qstring *vout, const vdloc_t &loc, int w)
 
bool arglocs_overlap (const vdloc_t &loc1, size_t w1, const vdloc_t &loc2, size_t w2)
 Do two arglocs overlap?
 
 DECLARE_TYPE_AS_MOVABLE (lvar_t)
 
 DECLARE_TYPE_AS_MOVABLE (lvar_saved_info_t)
 
bool restore_user_lvar_settings (lvar_uservec_t *lvinf, ea_t func_ea)
 Restore user defined local variable settings in the database. More...
 
void save_user_lvar_settings (ea_t func_ea, const lvar_uservec_t &lvinf)
 Save user defined local variable settings into the database. More...
 
bool modify_user_lvars (ea_t entry_ea, user_lvar_modifier_t &mlv)
 Modify saved local variable settings. More...
 
bool restore_user_defined_calls (udcall_map_t *udcalls, ea_t func_ea)
 Restore user defined function calls from the database. More...
 
void save_user_defined_calls (ea_t func_ea, const udcall_map_t &udcalls)
 Save user defined local function calls into the database. More...
 
bool parse_user_call (udcall_t *udc, const char *decl, bool silent)
 Convert function type declaration into internal structure. More...
 
merror_t convert_to_user_call (const udcall_t &udc, codegen_t &cdg)
 try to generate user-defined call for an instruction More...
 
void install_microcode_filter (microcode_filter_t *filter, bool install=true)
 register/unregister non-standard microcode generator More...
 
 DECLARE_TYPE_AS_MOVABLE (bitset_t)
 
 DECLARE_TYPE_AS_MOVABLE (ivl_t)
 
 DECLARE_TYPE_AS_MOVABLE (ivlset_t)
 
int get_mreg_name (qstring *out, int bit, int width, void *ud=NULL)
 
 DECLARE_TYPE_AS_MOVABLE (rlist_t)
 
 DECLARE_TYPE_AS_MOVABLE (mlist_t)
 
 DECLARE_TYPE_AS_MOVABLE (mlistvec_t)
 
 DECLARE_TYPE_AS_MOVABLE (mop_t)
 
 DECLARE_TYPE_AS_MOVABLE (mfuncarg_t)
 
const minsn_tgetf_reginsn (const minsn_t *ins)
 Skip assertions forward.
 
const minsn_tgetb_reginsn (const minsn_t *ins)
 Skip assertions backward.
 
minsn_tgetf_reginsn (minsn_t *ins)
 
minsn_tgetb_reginsn (minsn_t *ins)
 
 DECLARE_TYPE_AS_MOVABLE (hexwarn_t)
 
const char * get_hexrays_version (void)
 Get decompiler version. More...
 
vdui_topen_pseudocode (ea_t ea, int new_window)
 Open pseudocode window. More...
 
bool close_pseudocode (TWidget *f)
 Close pseudocode window. More...
 
vdui_tget_widget_vdui (TWidget *f)
 Get the vdui_t instance associated to the TWidget. More...
 
bool decompile_many (const char *outfile, eavec_t *funcaddrs, int flags)
 Batch decompilation. More...
 
void send_database (const hexrays_failure_t &err, bool silent)
 Send the database to Hex-Rays. More...
 
const char * dstr (const tinfo_t *tif)
 
mbl_array_tdeserialize_mbl_array (const uchar *bytes, size_t nbytes)
 
void remitem (const citem_t *e)
 
ctype_t negated_relation (ctype_t op)
 Negate a comparison operator. For example, cot_sge becomes cot_slt.
 
type_sign_t get_op_signness (ctype_t op)
 Get operator sign. Meaningful for sign-dependent operators, like cot_sdiv.
 
ctype_t asgop (ctype_t cop)
 Convert plain operator into assignment operator. For example, cot_add returns cot_asgadd.
 
ctype_t asgop_revert (ctype_t cop)
 Convert assignment operator into plain operator. More...
 
bool op_uses_x (ctype_t op)
 Does operator use the 'x' field of cexpr_t?
 
bool op_uses_y (ctype_t op)
 Does operator use the 'y' field of cexpr_t?
 
bool op_uses_z (ctype_t op)
 Does operator use the 'z' field of cexpr_t?
 
bool is_binary (ctype_t op)
 Is binary operator?
 
bool is_unary (ctype_t op)
 Is unary operator?
 
bool is_relational (ctype_t op)
 Is comparison operator?
 
bool is_assignment (ctype_t op)
 Is assignment operator?
 
bool accepts_udts (ctype_t op)
 
bool is_prepost (ctype_t op)
 Is pre/post increment/decrement operator?
 
bool is_commutative (ctype_t op)
 Is commutative operator?
 
bool is_additive (ctype_t op)
 Is additive operator?
 
bool is_multiplicative (ctype_t op)
 Is multiplicative operator?
 
bool is_bitop (ctype_t op)
 Is bit related operator?
 
bool is_logical (ctype_t op)
 Is logical operator?
 
bool is_loop (ctype_t op)
 Is loop statement code?
 
bool is_break_consumer (ctype_t op)
 Does a break statement influence the specified statement code?
 
bool is_lvalue (ctype_t op)
 Is Lvalue operator?
 
bool is_allowed_on_small_struni (ctype_t op)
 Is the operator allowed on small struni (structure/union)?
 
 DECLARE_TYPE_AS_MOVABLE (carg_t)
 
 DECLARE_TYPE_AS_MOVABLE (ccase_t)
 
cexpr_tlnot (cexpr_t *e)
 Logically negate the specified expression. More...
 
cinsn_tnew_block (void)
 Create a new block-statement.
 
cexpr_tvcreate_helper (bool standalone, const tinfo_t &type, const char *format, va_list va)
 
cexpr_tcreate_helper (bool standalone, const tinfo_t &type, const char *format,...)
 
cexpr_tvcall_helper (const tinfo_t &rettype, carglist_t *args, const char *format, va_list va)
 
cexpr_tcall_helper (const tinfo_t &rettype, carglist_t *args, const char *format,...)
 
cexpr_tmake_num (uint64 n, cfunc_t *func=NULL, ea_t ea=BADADDR, int opnum=0, type_sign_t sign=no_sign, int size=0)
 Create a number expression. More...
 
cexpr_tmake_ref (cexpr_t *e)
 Create a reference. More...
 
cexpr_tdereference (cexpr_t *e, int ptrsize, bool is_flt=false)
 Dereference a pointer. More...
 
void save_user_labels (ea_t func_ea, const user_labels_t *user_labels)
 Save user defined labels into the database. More...
 
void save_user_cmts (ea_t func_ea, const user_cmts_t *user_cmts)
 Save user defined comments into the database. More...
 
void save_user_numforms (ea_t func_ea, const user_numforms_t *numforms)
 Save user defined number formats into the database. More...
 
void save_user_iflags (ea_t func_ea, const user_iflags_t *iflags)
 Save user defined citem iflags into the database. More...
 
void save_user_unions (ea_t func_ea, const user_unions_t *unions)
 Save user defined union field selections into the database. More...
 
user_labels_trestore_user_labels (ea_t func_ea)
 Restore user defined labels from the database. More...
 
user_cmts_trestore_user_cmts (ea_t func_ea)
 Restore user defined comments from the database. More...
 
user_numforms_trestore_user_numforms (ea_t func_ea)
 Restore user defined number formats from the database. More...
 
user_iflags_t * restore_user_iflags (ea_t func_ea)
 Restore user defined citem iflags from the database. More...
 
user_unions_t * restore_user_unions (ea_t func_ea)
 Restore user defined union field selections from the database. More...
 
cfuncptr_t decompile (const mba_ranges_t &mbr, hexrays_failure_t *hf, int flags=0)
 Decompile a snippet or a function. More...
 
cfuncptr_t decompile_func (func_t *pfn, hexrays_failure_t *hf)
 Decompile a function. More...
 
cfuncptr_t decompile_snippet (const rangevec_t &ranges, hexrays_failure_t *hf, int flags=0)
 Decompile a snippet. More...
 
mbl_array_tgen_microcode (const mba_ranges_t &mbr, hexrays_failure_t *hf, const mlist_t *retlist=NULL, int flags=0, mba_maturity_t reqmat=MMAT_GLBOPT3)
 Generate microcode of an arbitrary code snippet. More...
 
bool mark_cfunc_dirty (ea_t ea, bool close_views=false)
 Flush the cached decompilation results. More...
 
void clear_cached_cfuncs (void)
 Flush all cached decompilation results.
 
bool has_cached_cfunc (ea_t ea)
 Do we have a cached decompilation result for 'ea'?
 
const char * get_ctype_name (ctype_t op)
 
qstring create_field_name (const tinfo_t &type, uval_t offset=BADADDR)
 
bool install_hexrays_callback (hexrays_cb_t *callback, void *ud)
 Install handler for decompiler events. More...
 
int remove_hexrays_callback (hexrays_cb_t *callback, void *ud)
 Uninstall handler for decompiler events. More...
 
bool init_hexrays_plugin (int flags=0)
 Initialize your plugin for hex-rays decompiler. More...
 
void term_hexrays_plugin (void)
 Stop working with hex-rays decompiler.
 
user_numforms_iterator_t user_numforms_begin (const user_numforms_t *map)
 Get iterator pointing to the beginning of user_numforms_t.
 
user_numforms_iterator_t user_numforms_end (const user_numforms_t *map)
 Get iterator pointing to the end of user_numforms_t.
 
user_numforms_iterator_t user_numforms_next (user_numforms_iterator_t p)
 Move to the next element.
 
user_numforms_iterator_t user_numforms_prev (user_numforms_iterator_t p)
 Move to the previous element.
 
operand_locator_t const & user_numforms_first (user_numforms_iterator_t p)
 Get reference to the current map key.
 
number_format_tuser_numforms_second (user_numforms_iterator_t p)
 Get reference to the current map value.
 
user_numforms_iterator_t user_numforms_find (const user_numforms_t *map, const operand_locator_t &key)
 Find the specified key in user_numforms_t.
 
user_numforms_iterator_t user_numforms_insert (user_numforms_t *map, const operand_locator_t &key, const number_format_t &val)
 Insert new (operand_locator_t, number_format_t) pair into user_numforms_t.
 
void user_numforms_erase (user_numforms_t *map, user_numforms_iterator_t p)
 Erase current element from user_numforms_t.
 
void user_numforms_clear (user_numforms_t *map)
 Clear user_numforms_t.
 
size_t user_numforms_size (user_numforms_t *map)
 Get size of user_numforms_t.
 
void user_numforms_free (user_numforms_t *map)
 Delete user_numforms_t instance.
 
user_numforms_tuser_numforms_new (void)
 Create a new user_numforms_t instance.
 
lvar_mapping_iterator_t lvar_mapping_begin (const lvar_mapping_t *map)
 Get iterator pointing to the beginning of lvar_mapping_t.
 
lvar_mapping_iterator_t lvar_mapping_end (const lvar_mapping_t *map)
 Get iterator pointing to the end of lvar_mapping_t.
 
lvar_mapping_iterator_t lvar_mapping_next (lvar_mapping_iterator_t p)
 Move to the next element.
 
lvar_mapping_iterator_t lvar_mapping_prev (lvar_mapping_iterator_t p)
 Move to the previous element.
 
lvar_locator_t const & lvar_mapping_first (lvar_mapping_iterator_t p)
 Get reference to the current map key.
 
lvar_locator_tlvar_mapping_second (lvar_mapping_iterator_t p)
 Get reference to the current map value.
 
lvar_mapping_iterator_t lvar_mapping_find (const lvar_mapping_t *map, const lvar_locator_t &key)
 Find the specified key in lvar_mapping_t.
 
lvar_mapping_iterator_t lvar_mapping_insert (lvar_mapping_t *map, const lvar_locator_t &key, const lvar_locator_t &val)
 Insert new (lvar_locator_t, lvar_locator_t) pair into lvar_mapping_t.
 
void lvar_mapping_erase (lvar_mapping_t *map, lvar_mapping_iterator_t p)
 Erase current element from lvar_mapping_t.
 
void lvar_mapping_clear (lvar_mapping_t *map)
 Clear lvar_mapping_t.
 
size_t lvar_mapping_size (lvar_mapping_t *map)
 Get size of lvar_mapping_t.
 
void lvar_mapping_free (lvar_mapping_t *map)
 Delete lvar_mapping_t instance.
 
lvar_mapping_tlvar_mapping_new (void)
 Create a new lvar_mapping_t instance.
 
udcall_map_iterator_t udcall_map_begin (const udcall_map_t *map)
 Get iterator pointing to the beginning of udcall_map_t.
 
udcall_map_iterator_t udcall_map_end (const udcall_map_t *map)
 Get iterator pointing to the end of udcall_map_t.
 
udcall_map_iterator_t udcall_map_next (udcall_map_iterator_t p)
 Move to the next element.
 
udcall_map_iterator_t udcall_map_prev (udcall_map_iterator_t p)
 Move to the previous element.
 
ea_t const & udcall_map_first (udcall_map_iterator_t p)
 Get reference to the current map key.
 
udcall_tudcall_map_second (udcall_map_iterator_t p)
 Get reference to the current map value.
 
udcall_map_iterator_t udcall_map_find (const udcall_map_t *map, const ea_t &key)
 Find the specified key in udcall_map_t.
 
udcall_map_iterator_t udcall_map_insert (udcall_map_t *map, const ea_t &key, const udcall_t &val)
 Insert new (ea_t, udcall_t) pair into udcall_map_t.
 
void udcall_map_erase (udcall_map_t *map, udcall_map_iterator_t p)
 Erase current element from udcall_map_t.
 
void udcall_map_clear (udcall_map_t *map)
 Clear udcall_map_t.
 
size_t udcall_map_size (udcall_map_t *map)
 Get size of udcall_map_t.
 
void udcall_map_free (udcall_map_t *map)
 Delete udcall_map_t instance.
 
udcall_map_t * udcall_map_new (void)
 Create a new udcall_map_t instance.
 
user_cmts_iterator_t user_cmts_begin (const user_cmts_t *map)
 Get iterator pointing to the beginning of user_cmts_t.
 
user_cmts_iterator_t user_cmts_end (const user_cmts_t *map)
 Get iterator pointing to the end of user_cmts_t.
 
user_cmts_iterator_t user_cmts_next (user_cmts_iterator_t p)
 Move to the next element.
 
user_cmts_iterator_t user_cmts_prev (user_cmts_iterator_t p)
 Move to the previous element.
 
treeloc_t const & user_cmts_first (user_cmts_iterator_t p)
 Get reference to the current map key.
 
citem_cmt_tuser_cmts_second (user_cmts_iterator_t p)
 Get reference to the current map value.
 
user_cmts_iterator_t user_cmts_find (const user_cmts_t *map, const treeloc_t &key)
 Find the specified key in user_cmts_t.
 
user_cmts_iterator_t user_cmts_insert (user_cmts_t *map, const treeloc_t &key, const citem_cmt_t &val)
 Insert new (treeloc_t, citem_cmt_t) pair into user_cmts_t.
 
void user_cmts_erase (user_cmts_t *map, user_cmts_iterator_t p)
 Erase current element from user_cmts_t.
 
void user_cmts_clear (user_cmts_t *map)
 Clear user_cmts_t.
 
size_t user_cmts_size (user_cmts_t *map)
 Get size of user_cmts_t.
 
void user_cmts_free (user_cmts_t *map)
 Delete user_cmts_t instance.
 
user_cmts_tuser_cmts_new (void)
 Create a new user_cmts_t instance.
 
user_iflags_iterator_t user_iflags_begin (const user_iflags_t *map)
 Get iterator pointing to the beginning of user_iflags_t.
 
user_iflags_iterator_t user_iflags_end (const user_iflags_t *map)
 Get iterator pointing to the end of user_iflags_t.
 
user_iflags_iterator_t user_iflags_next (user_iflags_iterator_t p)
 Move to the next element.
 
user_iflags_iterator_t user_iflags_prev (user_iflags_iterator_t p)
 Move to the previous element.
 
citem_locator_t const & user_iflags_first (user_iflags_iterator_t p)
 Get reference to the current map key.
 
int32 & user_iflags_second (user_iflags_iterator_t p)
 Get reference to the current map value.
 
user_iflags_iterator_t user_iflags_find (const user_iflags_t *map, const citem_locator_t &key)
 Find the specified key in user_iflags_t.
 
user_iflags_iterator_t user_iflags_insert (user_iflags_t *map, const citem_locator_t &key, const int32 &val)
 Insert new (citem_locator_t, int32) pair into user_iflags_t.
 
void user_iflags_erase (user_iflags_t *map, user_iflags_iterator_t p)
 Erase current element from user_iflags_t.
 
void user_iflags_clear (user_iflags_t *map)
 Clear user_iflags_t.
 
size_t user_iflags_size (user_iflags_t *map)
 Get size of user_iflags_t.
 
void user_iflags_free (user_iflags_t *map)
 Delete user_iflags_t instance.
 
user_iflags_t * user_iflags_new (void)
 Create a new user_iflags_t instance.
 
user_unions_iterator_t user_unions_begin (const user_unions_t *map)
 Get iterator pointing to the beginning of user_unions_t.
 
user_unions_iterator_t user_unions_end (const user_unions_t *map)
 Get iterator pointing to the end of user_unions_t.
 
user_unions_iterator_t user_unions_next (user_unions_iterator_t p)
 Move to the next element.
 
user_unions_iterator_t user_unions_prev (user_unions_iterator_t p)
 Move to the previous element.
 
ea_t const & user_unions_first (user_unions_iterator_t p)
 Get reference to the current map key.
 
intvec_t & user_unions_second (user_unions_iterator_t p)
 Get reference to the current map value.
 
user_unions_iterator_t user_unions_find (const user_unions_t *map, const ea_t &key)
 Find the specified key in user_unions_t.
 
user_unions_iterator_t user_unions_insert (user_unions_t *map, const ea_t &key, const intvec_t &val)
 Insert new (ea_t, intvec_t) pair into user_unions_t.
 
void user_unions_erase (user_unions_t *map, user_unions_iterator_t p)
 Erase current element from user_unions_t.
 
void user_unions_clear (user_unions_t *map)
 Clear user_unions_t.
 
size_t user_unions_size (user_unions_t *map)
 Get size of user_unions_t.
 
void user_unions_free (user_unions_t *map)
 Delete user_unions_t instance.
 
user_unions_t * user_unions_new (void)
 Create a new user_unions_t instance.
 
user_labels_iterator_t user_labels_begin (const user_labels_t *map)
 Get iterator pointing to the beginning of user_labels_t.
 
user_labels_iterator_t user_labels_end (const user_labels_t *map)
 Get iterator pointing to the end of user_labels_t.
 
user_labels_iterator_t user_labels_next (user_labels_iterator_t p)
 Move to the next element.
 
user_labels_iterator_t user_labels_prev (user_labels_iterator_t p)
 Move to the previous element.
 
int const & user_labels_first (user_labels_iterator_t p)
 Get reference to the current map key.
 
qstring & user_labels_second (user_labels_iterator_t p)
 Get reference to the current map value.
 
user_labels_iterator_t user_labels_find (const user_labels_t *map, const int &key)
 Find the specified key in user_labels_t.
 
user_labels_iterator_t user_labels_insert (user_labels_t *map, const int &key, const qstring &val)
 Insert new (int, qstring) pair into user_labels_t.
 
void user_labels_erase (user_labels_t *map, user_labels_iterator_t p)
 Erase current element from user_labels_t.
 
void user_labels_clear (user_labels_t *map)
 Clear user_labels_t.
 
size_t user_labels_size (user_labels_t *map)
 Get size of user_labels_t.
 
void user_labels_free (user_labels_t *map)
 Delete user_labels_t instance.
 
user_labels_tuser_labels_new (void)
 Create a new user_labels_t instance.
 
eamap_iterator_t eamap_begin (const eamap_t *map)
 Get iterator pointing to the beginning of eamap_t.
 
eamap_iterator_t eamap_end (const eamap_t *map)
 Get iterator pointing to the end of eamap_t.
 
eamap_iterator_t eamap_next (eamap_iterator_t p)
 Move to the next element.
 
eamap_iterator_t eamap_prev (eamap_iterator_t p)
 Move to the previous element.
 
ea_t const & eamap_first (eamap_iterator_t p)
 Get reference to the current map key.
 
cinsnptrvec_teamap_second (eamap_iterator_t p)
 Get reference to the current map value.
 
eamap_iterator_t eamap_find (const eamap_t *map, const ea_t &key)
 Find the specified key in eamap_t.
 
eamap_iterator_t eamap_insert (eamap_t *map, const ea_t &key, const cinsnptrvec_t &val)
 Insert new (ea_t, cinsnptrvec_t) pair into eamap_t.
 
void eamap_erase (eamap_t *map, eamap_iterator_t p)
 Erase current element from eamap_t.
 
void eamap_clear (eamap_t *map)
 Clear eamap_t.
 
size_t eamap_size (eamap_t *map)
 Get size of eamap_t.
 
void eamap_free (eamap_t *map)
 Delete eamap_t instance.
 
eamap_t * eamap_new (void)
 Create a new eamap_t instance.
 
boundaries_iterator_t boundaries_begin (const boundaries_t *map)
 Get iterator pointing to the beginning of boundaries_t.
 
boundaries_iterator_t boundaries_end (const boundaries_t *map)
 Get iterator pointing to the end of boundaries_t.
 
boundaries_iterator_t boundaries_next (boundaries_iterator_t p)
 Move to the next element.
 
boundaries_iterator_t boundaries_prev (boundaries_iterator_t p)
 Move to the previous element.
 
cinsn_t *const & boundaries_first (boundaries_iterator_t p)
 Get reference to the current map key.
 
rangeset_t & boundaries_second (boundaries_iterator_t p)
 Get reference to the current map value.
 
boundaries_iterator_t boundaries_find (const boundaries_t *map, const cinsn_t *&key)
 Find the specified key in boundaries_t.
 
boundaries_iterator_t boundaries_insert (boundaries_t *map, const cinsn_t *&key, const rangeset_t &val)
 Insert new (cinsn_t *, rangeset_t) pair into boundaries_t.
 
void boundaries_erase (boundaries_t *map, boundaries_iterator_t p)
 Erase current element from boundaries_t.
 
void boundaries_clear (boundaries_t *map)
 Clear boundaries_t.
 
size_t boundaries_size (boundaries_t *map)
 Get size of boundaries_t.
 
void boundaries_free (boundaries_t *map)
 Delete boundaries_t instance.
 
boundaries_t * boundaries_new (void)
 Create a new boundaries_t instance.
 
block_chains_iterator_t block_chains_begin (const block_chains_t *map)
 Get iterator pointing to the beginning of block_chains_t.
 
block_chains_iterator_t block_chains_end (const block_chains_t *map)
 Get iterator pointing to the end of block_chains_t.
 
block_chains_iterator_t block_chains_next (block_chains_iterator_t p)
 Move to the next element.
 
block_chains_iterator_t block_chains_prev (block_chains_iterator_t p)
 Move to the previous element.
 
mreg_t const & block_chains_first (block_chains_iterator_t p)
 Get reference to the current map key.
 
chain_tblock_chains_second (block_chains_iterator_t p)
 Get reference to the current map value.
 
block_chains_iterator_t block_chains_find (const block_chains_t *map, const mreg_t &key)
 Find the specified key in block_chains_t.
 
block_chains_iterator_t block_chains_insert (block_chains_t *map, const mreg_t &key, const chain_t &val)
 Insert new (mreg_t, chain_t) pair into block_chains_t.
 
void block_chains_erase (block_chains_t *map, block_chains_iterator_t p)
 Erase current element from block_chains_t.
 
void block_chains_clear (block_chains_t *map)
 Clear block_chains_t.
 
size_t block_chains_size (block_chains_t *map)
 Get size of block_chains_t.
 
void block_chains_free (block_chains_t *map)
 Delete block_chains_t instance.
 
block_chains_tblock_chains_new (void)
 Create a new block_chains_t instance.
 

Variables

const maymust_t MUST_ACCESS = 0x00
 
const maymust_t MAY_ACCESS = 0x01
 
const maymust_t MAYMUST_ACCESS_MASK = 0x01
 
const maymust_t ONE_ACCESS_TYPE = 0x20
 
const maymust_t INCLUDE_SPOILED_REGS = 0x40
 
const maymust_t EXCLUDE_PASS_REGS = 0x80
 
const maymust_t FULL_XDSU = 0x100
 
const maymust_t WITH_ASSERTS = 0x200
 
const maymust_t EXCLUDE_VOLATILE = 0x400
 
const maymust_t INCLUDE_UNUSED_SRC = 0x800
 
const mreg_t mr_none = mreg_t(-1)
 
const mreg_t mr_cf = mreg_t(0)
 
const mreg_t mr_zf = mreg_t(1)
 
const mreg_t mr_sf = mreg_t(2)
 
const mreg_t mr_of = mreg_t(3)
 
const mreg_t mr_pf = mreg_t(4)
 
const int cc_count = mr_pf - mr_cf + 1
 
const mreg_t mr_cc = mreg_t(5)
 
const mreg_t mr_first = mreg_t(8)
 
const int bitset_width = (sizeof(mbitmap_t)*CHAR_BIT)
 
const int bitset_align = bitset_width - 1
 
const mopt_t mop_z = 0
 
const mopt_t mop_r = 1
 
const mopt_t mop_n = 2
 
const mopt_t mop_str = 3
 
const mopt_t mop_d = 4
 
const mopt_t mop_S = 5
 
const mopt_t mop_v = 6
 
const mopt_t mop_b = 7
 
const mopt_t mop_f = 8
 
const mopt_t mop_l = 9
 
const mopt_t mop_a = 10
 
const mopt_t mop_h = 11
 
const mopt_t mop_c = 12
 
const mopt_t mop_fn = 13
 
const mopt_t mop_p = 14
 
const mopt_t mop_sc = 15
 
const mopt_t mop_sl = 3
 
const mopt_t mop_sn = 13
 
const mopt_t mop_esc = 15
 
const mopt_t mop_sstr = 1
 
const mopt_t mop_sfn = 2
 
const mopt_t mop_scs = 3
 
const int NOSIZE = -1
 
const int MAX_OPSIZE = 2 * sizeof(ea_t)
 
const int DOUBLE_OPSIZE = 2 * MAX_OPSIZE
 
const uchar FX_NONE = 0
 not applicable
 
const uchar FX_INFIX = 1
 infix: a + b
 
const uchar FX_PREFIX = 2
 prefix: *a
 
const uchar FX_POSTFIX = 3
 postfix: a++
 
const uchar FX_TERNARY = 4
 ternary: a ? b : c
 
const uchar COI_RL = 0x00
 right to left
 
const uchar COI_LR = 0x01
 left to right
 
const uchar COI_INT = 0x02
 requires integer operands
 
const uchar COI_FP = 0x04
 requires floating point operands
 
const uchar COI_SH = 0x08
 is shift operation?
 
const uchar COI_SGN = 0x10
 sign sensitive?
 
const uchar COI_SBN = 0x20
 is simple binary?
 
const int64 HEXRAYS_API_MAGIC = 0x00DEC0DE00000002LL
 
const cmt_type_t CMT_NONE = 0x0000
 No comment is possible.
 
const cmt_type_t CMT_TAIL = 0x0001
 Indented comment.
 
const cmt_type_t CMT_BLOCK1 = 0x0002
 Anterioir block comment.
 
const cmt_type_t CMT_BLOCK2 = 0x0004
 Posterior block comment.
 
const cmt_type_t CMT_LVAR = 0x0008
 Local variable comment.
 
const cmt_type_t CMT_FUNC = 0x0010
 Function comment.
 
const cmt_type_t CMT_ALL = 0x001F
 All comments.
 
hexdsp_thexdsp
 Pointer to Hex-Rays decompiler dispatcher. More...
 

Detailed Description

HexRays SDK header file.

The decompiler SDK consists of a single header file.

The header file defines data structures and inline functions. All interaction with the decompiler is made through a single function pointer: hexdsp. This pointer is initialized at the beginning and is used to call the decompiler for all actions.

Currently the SDK is not settled down and we can not guarantee compatibility with the older versions. Hopefully this problem will be solved in the near future.

Definition in file hexrays.hpp.

Macro Definition Documentation

◆ DECLARE_COMPARISON_OPERATORS

#define DECLARE_COMPARISON_OPERATORS (   type)
Value:
bool operator==(const type &r) const { return compare(r) == 0; } \
bool operator!=(const type &r) const { return compare(r) != 0; } \
bool operator< (const type &r) const { return compare(r) < 0; } \
bool operator> (const type &r) const { return compare(r) > 0; } \
bool operator<=(const type &r) const { return compare(r) <= 0; } \
bool operator>=(const type &r) const { return compare(r) >= 0; }

Macro to declare standard inline comparison operators.

Definition at line 489 of file hexrays.hpp.

◆ DECLARE_COMPARISONS

#define DECLARE_COMPARISONS (   type)
Value:
friend int compare(const type &a, const type &b) { return a.compare(b); } \
int compare(const type &r) const
#define DECLARE_COMPARISON_OPERATORS(type)
Macro to declare standard inline comparison operators.
Definition: hexrays.hpp:489

Macro to declare comparisons for our classes All comparison operators call the compare() function which returns -1/0/1.

Definition at line 499 of file hexrays.hpp.

Typedef Documentation

◆ hexdsp_t

typedef void * hexdsp_t(int code,...)

Hex-Rays decompiler dispatcher.

All interaction with the decompiler is carried out by the intermediary of this dispatcher.

Examples:
hexrays_sample1.cpp, hexrays_sample10.cpp, hexrays_sample11.cpp, hexrays_sample12.cpp, hexrays_sample13.cpp, hexrays_sample14.cpp, hexrays_sample15.cpp, hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample4.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, hexrays_sample7.cpp, and hexrays_sample9.cpp.

Definition at line 4761 of file hexrays.hpp.

◆ hexrays_cb_t

typedef ssize_t hexrays_cb_t(void *ud, hexrays_event_t event, va_list va)

Handler of decompiler events.

Parameters
uduser data. the value specified at the handler installation time is passed here.
eventdecompiler event code
vaadditional arguments
Returns
as a rule the callback must return 0 unless specified otherwise in the event description.

Definition at line 4935 of file hexrays.hpp.

Enumeration Type Documentation

◆ allow_unused_labels_t

Unused label disposition.

Enumerator
FORBID_UNUSED_LABELS 

Unused labels cause interr.

ALLOW_UNUSED_LABELS 

Unused labels are permitted.

Definition at line 4264 of file hexrays.hpp.

◆ cmt_retrieval_type_t

Comment retrieval type.

Ctree remembers what comments have already been retrieved. This is done because our mechanism of item_precisers is still not perfect and in theory some listing lines can not be told apart. To avoid comment duplication, we remember if a comment has already been used or not.

Enumerator
RETRIEVE_ONCE 

Retrieve comment if it has not been used yet.

RETRIEVE_ALWAYS 

Retrieve comment even if it has been used.

Definition at line 3574 of file hexrays.hpp.

◆ ctree_maturity_t

Ctree maturity level.

The level will increase as we switch from one phase of ctree generation to the next one

Enumerator
CMAT_ZERO 

does not exist

CMAT_BUILT 

just generated

CMAT_TRANS1 

applied first wave of transformations

CMAT_NICE 

nicefied expressions

CMAT_TRANS2 

applied second wave of transformations

CMAT_CPA 

corrected pointer arithmetic

CMAT_TRANS3 

applied third wave of transformations

CMAT_CASTED 

added necessary casts

CMAT_FINAL 

ready-to-use

Definition at line 3500 of file hexrays.hpp.

◆ ctype_t

enum ctype_t

Ctree element type.

At the beginning of this list there are expression elements (cot_...), followed by statement elements (cit_...).

Enumerator
cot_comma 

x, y

cot_asg 

x = y

cot_asgbor 

x |= y

cot_asgxor 

x ^= y

cot_asgband 

x &= y

cot_asgadd 

x += y

cot_asgsub 

x -= y

cot_asgmul 

x *= y

cot_asgsshr 

x >>= y signed

cot_asgushr 

x >>= y unsigned

cot_asgshl 

x <<= y

cot_asgsdiv 

x /= y signed

cot_asgudiv 

x /= y unsigned

cot_asgsmod 

x %= y signed

cot_asgumod 

x %= y unsigned

cot_tern 

x ? y : z

cot_lor 

x || y

cot_land 

x && y

cot_bor 

x | y

cot_xor 

x ^ y

cot_band 

x & y

cot_eq 

x == y int or fpu (see EXFL_FPOP)

cot_ne 

x != y int or fpu (see EXFL_FPOP)

cot_sge 

x >= y signed or fpu (see EXFL_FPOP)

cot_uge 

x >= y unsigned

cot_sle 

x <= y signed or fpu (see EXFL_FPOP)

cot_ule 

x <= y unsigned

cot_sgt 

x > y signed or fpu (see EXFL_FPOP)

cot_ugt 

x > y unsigned

cot_slt 

x < y signed or fpu (see EXFL_FPOP)

cot_ult 

x < y unsigned

cot_sshr 

x >> y signed

cot_ushr 

x >> y unsigned

cot_shl 

x << y

cot_add 

x + y

cot_sub 

x - y

cot_mul 

x * y

cot_sdiv 

x / y signed

cot_udiv 

x / y unsigned

cot_smod 

x % y signed

cot_umod 

x % y unsigned

cot_fadd 

x + y fp

cot_fsub 

x - y fp

cot_fmul 

x * y fp

cot_fdiv 

x / y fp

cot_fneg 

-x fp

cot_neg 

-x

cot_cast 

(type)x

cot_lnot 

!x

cot_bnot 

~x

cot_ptr 

*x, access size in 'ptrsize'

cot_ref 

&x

cot_postinc 

x++

cot_postdec 

x–

cot_preinc 

++x

cot_predec 

–x

cot_call 

x(...)

cot_idx 

x[y]

cot_memref 

x.m

cot_memptr 

x->m, access size in 'ptrsize'

cot_num 

n

cot_fnum 

fpc

cot_str 

string constant

cot_obj 

obj_ea

cot_var 

v

cot_insn 

instruction in expression, internal representation only

cot_sizeof 

sizeof(x)

cot_helper 

arbitrary name

cot_type 

arbitrary type

cit_empty 

instruction types start here

cit_block 

block-statement: { ... }

cit_expr 

expression-statement: expr;

cit_if 

if-statement

cit_for 

for-statement

cit_while 

while-statement

cit_do 

do-statement

cit_switch 

switch-statement

cit_break 

break-statement

cit_continue 

continue-statement

cit_return 

return-statement

cit_goto 

goto-statement

cit_asm 

asm-statement

Definition at line 3075 of file hexrays.hpp.

◆ cursor_item_type_t

Type of the cursor item.

Enumerator
VDI_NONE 

undefined

VDI_EXPR 

c-tree item

VDI_LVAR 

declaration of local variable

VDI_FUNC 

the function itself (the very first line with the function prototype)

VDI_TAIL 

cursor is at (beyond) the line end (commentable line)

Definition at line 4193 of file hexrays.hpp.

◆ hexrays_event_t

Decompiler events.

Use install_hexrays_callback() to install a handler for decompiler events. When the possible return value is not specified, your callback must return zero.

Enumerator
hxe_flowchart 

Flowchart has been generated.

qflow_chart_t *fc

hxe_stkpnts 

SP change points have been calculated.

mbl_array_t *mba
stkpnts_t *stkpnts
return Microcode error codes code

hxe_prolog 

Prolog analysis has been finished.

mbl_array_t *mba
qflow_chart_t *fc
bitset_t *reachable_blocks return Microcode error codes code

hxe_microcode 

Microcode has been generated.

mbl_array_t *mba return Microcode error codes code

hxe_preoptimized 

Microcode has been preoptimized.

mbl_array_t *mba return Microcode error codes code

hxe_locopt 

Basic block level optimization has been finished.

mbl_array_t *mba return Microcode error codes code

hxe_prealloc 

Local variables: preallocation step begins.


mbl_array_t *mba
This event may occur several times
Should return: 1 if modified microcode
Negative values are Microcode error codes error codes

hxe_glbopt 

Global optimization has been finished.

mbl_array_t *mba return Microcode error codes code

hxe_structural 

Structural analysis has been finished.

control_graph_t *ct

hxe_maturity 

Ctree maturity level is being changed.

cfunc_t *cfunc
ctree_maturity_t new_maturity

hxe_interr 

Internal error has occurred.

int errcode

hxe_combine 

Trying to combine instructions of basic block.

mblock_t *blk
minsn_t *insn
Should return: 1 if combined the current instruction with a preceding one

hxe_print_func 

Printing ctree and generating text.

cfunc_t *cfunc
vc_printer_t *vp
Returns: 1 if text has been generated by the plugin

hxe_func_printed 

Function text has been generated.

Plugins may modify the text in cfunc_t::sv. cfunc_t *cfunc

hxe_resolve_stkaddrs 

The optimizer is about to resolve stack addresses.

mbl_array_t *mba

hxe_open_pseudocode 

New pseudocode view has been opened.

vdui_t *vu

hxe_switch_pseudocode 

Existing pseudocode view has been reloaded with a new function.

Its text has not been refreshed yet, only cfunc and mba pointers are ready.
vdui_t *vu

hxe_refresh_pseudocode 

Existing pseudocode text has been refreshed.

Adding/removing pseudocode lines is forbidden in this event. This event is obsolete, please use hxe_func_printed. vdui_t *vu
See also hxe_text_ready, which happens earlier

hxe_close_pseudocode 

Pseudocode view is being closed.

vdui_t *vu

hxe_keyboard 

Keyboard has been hit.

vdui_t *vu
int key_code (VK_...)
int shift_state
Should return: 1 if the event has been handled

hxe_right_click 

Mouse right click.

Use hxe_populating_popup instead, in case you want to add items in the popup menu. vdui_t *vu

hxe_double_click 

Mouse double click.

vdui_t *vu
int shift_state
Should return: 1 if the event has been handled

hxe_curpos 

Current cursor position has been changed.

(for example, by left-clicking or using keyboard)
vdui_t *vu

hxe_create_hint 

Create a hint for the current item.

vdui_t *vu
qstring *result_hint
int *implines
Possible return values:
0: the event has not been handled
1: hint has been created (should set *implines to nonzero as well)
2: hint has been created but the standard hints must be appended by the decompiler

hxe_text_ready 

Decompiled text is ready.

vdui_t *vu
This event can be used to modify the output text (sv). The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree elements

hxe_populating_popup 

Populating popup menu.

We can add menu items now. TWidget *widget
TPopupMenu *popup_handle
vdui_t *vu

lxe_lvar_name_changed 

Local variable got renamed.

vdui_t *vu
lvar_t *v
const char *name
bool is_user_name
Please note that it is possible to read/write user settings for lvars directly from the idb.

lxe_lvar_type_changed 

Local variable type got changed.

vdui_t *vu
lvar_t *v
const char *tinfo
Please note that it is possible to read/write user settings for lvars directly from the idb.

lxe_lvar_cmt_changed 

Local variable comment got changed.

vdui_t *vu
lvar_t *v
const char *cmt
Please note that it is possible to read/write user settings for lvars directly from the idb.

lxe_lvar_mapping_changed 

Local variable mapping got changed.

vdui_t *vu
lvar_t *from
lvar_t *to
Please note that it is possible to read/write user settings for lvars directly from the idb.

Definition at line 4768 of file hexrays.hpp.

◆ item_preciser_t

Comment item preciser.

Item preciser is used to assign comments to ctree items A ctree item may have several comments attached to it. For example, an if-statement may have the following comments:

 if ( ... )    // cmt1
 {             // cmt2
 }             // cmt3
 else          // cmt4
 {                     -- usually the else block has a separate ea
 } 

The first 4 comments will have the same ea. In order to denote the exact line for the comment, we store the item_preciser along with ea.

Enumerator
ITP_EMPTY 

nothing

ITP_ARG1 

, (64 entries are reserved for 64 call arguments)

ITP_ASM 

__asm-line

ITP_ELSE 

else-line

ITP_DO 

do-line

ITP_SEMI 

semicolon

ITP_CURLY1 

{

ITP_CURLY2 

}

ITP_BRACE2 

)

ITP_COLON 

: (label)

ITP_BLOCK1 

opening block comment.

this comment is printed before the item (other comments are indented and printed after the item)

ITP_BLOCK2 

closing block comment.

ITP_CASE 

bit for switch cases

ITP_SIGN 

if this bit is set too, then we have a negative case value

Definition at line 3526 of file hexrays.hpp.

◆ mba_maturity_t

Microcode maturity levels.

Enumerator
MMAT_ZERO 

microcode does not exist

MMAT_GENERATED 

generated microcode

MMAT_PREOPTIMIZED 

preoptimized pass is complete

MMAT_LOCOPT 

local optimization of each basic block is complete

MMAT_CALLS 

detected call arguments

MMAT_GLBOPT1 

performed the first pass of global optimization

MMAT_GLBOPT2 

most global optimization passes are done

MMAT_GLBOPT3 

completed all global optimization

MMAT_LVARS 

allocated local variables

Definition at line 2524 of file hexrays.hpp.

◆ use_curly_t

Should curly braces be printed?

Enumerator
CALC_CURLY_BRACES 

print curly braces if necessary

NO_CURLY_BRACES 

don't print curly braces

USE_CURLY_BRACES 

print curly braces without any checks

Definition at line 3925 of file hexrays.hpp.

Function Documentation

◆ asgop_revert()

ctype_t asgop_revert ( ctype_t  cop)

Convert assignment operator into plain operator.

For example, cot_asgadd returns cot_add

Returns
cot_empty is the input operator is not an assignment operator.

Definition at line 8365 of file hexrays.hpp.

References hexdsp.

◆ close_pseudocode()

bool close_pseudocode ( TWidget f)

Close pseudocode window.

Parameters
fpointer to window
Returns
false if failed

Definition at line 8297 of file hexrays.hpp.

References hexdsp.

◆ convert_to_user_call()

merror_t convert_to_user_call ( const udcall_t udc,
codegen_t cdg 
)

try to generate user-defined call for an instruction

Returns
Microcode error codes code: MERR_OK - user-defined call generated else - error (MERR_INSN == inacceptable udc.tif)

Definition at line 7295 of file hexrays.hpp.

References hexdsp.

◆ decompile()

cfuncptr_t decompile ( const mba_ranges_t mbr,
hexrays_failure_t hf,
int  flags = 0 
)

Decompile a snippet or a function.

Parameters
mbrwhat to decompile
hfextended error information (if failed)
flagsbitwise combination of decompile() flags... bits
Returns
pointer to the decompilation result (a reference counted pointer). NULL if failed.
Examples:
hexrays_sample1.cpp, and hexrays_sample14.cpp.

Definition at line 8971 of file hexrays.hpp.

Referenced by decompile_func(), and decompile_snippet().

◆ decompile_func()

cfuncptr_t decompile_func ( func_t *  pfn,
hexrays_failure_t hf 
)

Decompile a function.

Multiple decompilations of the same function return the same object.

Parameters
pfnpointer to function to decompile
hfextended error information (if failed)
Returns
pointer to the decompilation result (a reference counted pointer). NULL if failed.

Definition at line 4651 of file hexrays.hpp.

References decompile().

◆ decompile_many()

bool decompile_many ( const char *  outfile,
eavec_t *  funcaddrs,
int  flags 
)

Batch decompilation.

Decompile all or the specified functions

Returns
true if no internal error occurred and the user has not cancelled decompilation
Parameters
outfilename of the output file
funcaddrslist of functions to decompile. If NULL or empty, then decompile all nonlib functions
flagsBatch decompilation bits

Definition at line 8309 of file hexrays.hpp.

References hexdsp.

◆ decompile_snippet()

cfuncptr_t decompile_snippet ( const rangevec_t &  ranges,
hexrays_failure_t hf,
int  flags = 0 
)

Decompile a snippet.

Parameters
rangessnippet ranges. ranges[0].start_ea is the entry point
hfextended error information (if failed)
flagsbitwise combination of decompile() flags... bits
Returns
pointer to the decompilation result (a reference counted pointer). NULL if failed.

Definition at line 4665 of file hexrays.hpp.

References decompile().

◆ dereference()

cexpr_t * dereference ( cexpr_t e,
int  ptrsize,
bool  is_flt = false 
)

Dereference a pointer.

This function dereferences a pointer expression. It performs the following conversion: "ptr" => "*ptr" It can handle discrepancies in the pointer type and the access size.

Parameters
eexpression to deference
ptrsizeaccess size
is_fltdereferencing for floating point access?
Returns
dereferenced expression

Definition at line 8753 of file hexrays.hpp.

References hexdsp.

◆ gen_microcode()

mbl_array_t * gen_microcode ( const mba_ranges_t mbr,
hexrays_failure_t hf,
const mlist_t retlist = NULL,
int  flags = 0,
mba_maturity_t  reqmat = MMAT_GLBOPT3 
)

Generate microcode of an arbitrary code snippet.

Parameters
mbrsnippet ranges
retlistlist of registers the snippet returns
hfextended error information (if failed)
flagsbitwise combination of decompile() flags... bits
reqmatrequired microcode maturity
Returns
pointer to the microcode, NULL if failed.
Examples:
hexrays_sample12.cpp, hexrays_sample13.cpp, hexrays_sample15.cpp, and hexrays_sample9.cpp.

Definition at line 8977 of file hexrays.hpp.

References hexdsp.

◆ get_hexrays_version()

const char * get_hexrays_version ( void  )

Get decompiler version.

The returned string is of the form <major>.<minor>.<revision>.<build-date>

Returns
pointer to version string. For example: "2.0.0.140605"
Examples:
hexrays_sample1.cpp, hexrays_sample10.cpp, hexrays_sample11.cpp, hexrays_sample12.cpp, hexrays_sample13.cpp, hexrays_sample14.cpp, hexrays_sample15.cpp, hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample4.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, hexrays_sample7.cpp, and hexrays_sample9.cpp.

Definition at line 8285 of file hexrays.hpp.

References hexdsp.

◆ get_merror_desc()

ea_t get_merror_desc ( qstring *  out,
merror_t  code,
mbl_array_t mba 
)

Get textual description of an error code.

Parameters
outthe output buffer for the error description
codeMicrocode error codes
mbathe microcode array
Returns
the error address
Examples:
hexrays_sample12.cpp.

Definition at line 6973 of file hexrays.hpp.

References hexdsp.

◆ get_widget_vdui()

vdui_t * get_widget_vdui ( TWidget f)

Get the vdui_t instance associated to the TWidget.

Parameters
fpointer to window
Returns
a vdui_t *, or NULL
Examples:
hexrays_sample3.cpp, and hexrays_sample5.cpp.

Definition at line 8303 of file hexrays.hpp.

References hexdsp.

◆ init_hexrays_plugin()

bool init_hexrays_plugin ( int  flags = 0)

Initialize your plugin for hex-rays decompiler.

This function must be called before calling any other decompiler function. It initializes the pointer to the dispatcher.

Parameters
flagsreserved, must be 0
Returns
true if the decompiler exists and the dispatcher pointer is ready to use.
Examples:
hexrays_sample1.cpp, hexrays_sample10.cpp, hexrays_sample11.cpp, hexrays_sample12.cpp, hexrays_sample13.cpp, hexrays_sample14.cpp, hexrays_sample15.cpp, hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample4.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, hexrays_sample7.cpp, and hexrays_sample9.cpp.

Definition at line 5870 of file hexrays.hpp.

◆ install_hexrays_callback()

bool install_hexrays_callback ( hexrays_cb_t callback,
void *  ud 
)

Install handler for decompiler events.

Parameters
callbackhandler to install
uduser data. this pointer will be passed to your handler by the decompiler.
Returns
false if failed
Examples:
hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, and hexrays_sample7.cpp.

Definition at line 9015 of file hexrays.hpp.

References hexdsp.

◆ install_microcode_filter()

void install_microcode_filter ( microcode_filter_t filter,
bool  install = true 
)

register/unregister non-standard microcode generator

Parameters
filter- microcode generator object
install- TRUE - register the object, FALSE - unregister

Definition at line 7301 of file hexrays.hpp.

References hexdsp.

◆ lnot()

cexpr_t * lnot ( cexpr_t e)

Logically negate the specified expression.

The specified expression will be logically negated. For example, "x == y" is converted into "x != y" by this function.

Parameters
eexpression to negate. After the call, e must not be used anymore because it can be changed by the function. The function return value must be used to refer to the expression.
Returns
logically negated expression.
Examples:
hexrays_sample3.cpp.

Definition at line 8717 of file hexrays.hpp.

References hexdsp.

◆ make_num()

cexpr_t * make_num ( uint64  n,
cfunc_t func = NULL,
ea_t  ea = BADADDR,
int  opnum = 0,
type_sign_t  sign = no_sign,
int  size = 0 
)

Create a number expression.

Parameters
nvalue
funccurrent function
eadefinition address of the number
opnumoperand number of the number (in the disassembly listing)
signnumber sign
sizesize of number in bytes

Definition at line 8741 of file hexrays.hpp.

References hexdsp.

◆ make_ref()

cexpr_t * make_ref ( cexpr_t e)

Create a reference.

This function performs the following conversion: "obj" => "&obj". It can handle casts, annihilate "&*", and process other special cases.

Definition at line 8747 of file hexrays.hpp.

References hexdsp.

◆ mark_cfunc_dirty()

bool mark_cfunc_dirty ( ea_t  ea,
bool  close_views = false 
)

Flush the cached decompilation results.

Erases a cache entry for the specified function.

Parameters
eafunction to erase from the cache
close_viewsclose pseudocode windows that show the function
Returns
if a cache entry existed.

Definition at line 8983 of file hexrays.hpp.

References hexdsp.

◆ modify_user_lvars()

bool modify_user_lvars ( ea_t  entry_ea,
user_lvar_modifier_t mlv 
)

Modify saved local variable settings.

Parameters
entry_eafunction start address
mlvlocal variable modifier
Returns
true if modified variables

Definition at line 7271 of file hexrays.hpp.

References hexdsp.

◆ mreg2reg()

int mreg2reg ( mreg_t  reg,
int  width 
)

Map a microregister to processor register.

Parameters
regmicroregister number
widthsize of microregister in bytes
Returns
processor register id or -1

Definition at line 6987 of file hexrays.hpp.

References hexdsp.

◆ open_pseudocode()

vdui_t * open_pseudocode ( ea_t  ea,
int  new_window 
)

Open pseudocode window.

The specified function is decompiled and the pseudocode window is opened.

Parameters
eafunction to decompile
new_window0:reuse existing window; 1:open new window; -1: reuse existing window if the current view is pseudocode
Returns
false if failed

Definition at line 8291 of file hexrays.hpp.

References hexdsp.

◆ parse_user_call()

bool parse_user_call ( udcall_t udc,
const char *  decl,
bool  silent 
)

Convert function type declaration into internal structure.

Parameters
udc- pointer to output structure
decl- function type declaration
silent- if TRUE: do not show warning in case of incorrect type
Returns
success

Definition at line 7289 of file hexrays.hpp.

References hexdsp.

◆ reg2mreg()

mreg_t reg2mreg ( int  reg)


Map a processor register to microregister.

Parameters
regprocessor register number
Returns
microregister register id or mr_none
Examples:
hexrays_sample12.cpp, and hexrays_sample15.cpp.

Definition at line 6981 of file hexrays.hpp.

References hexdsp.

◆ remove_hexrays_callback()

int remove_hexrays_callback ( hexrays_cb_t callback,
void *  ud 
)

Uninstall handler for decompiler events.

Parameters
callbackhandler to uninstall
uduser data. if NULL, all handler corresponding to callback is uninstalled. if not NULL, only the callback instance with the specified ud value is uninstalled.
Returns
number of uninstalled handlers.
Examples:
hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, and hexrays_sample7.cpp.

Definition at line 9021 of file hexrays.hpp.

References hexdsp.

◆ restore_user_cmts()

user_cmts_t * restore_user_cmts ( ea_t  func_ea)

Restore user defined comments from the database.

Parameters
func_eathe entry address of the function
Returns
collection of user defined comments. The returned object must be deleted by the caller using delete_user_cmts()
Examples:
hexrays_sample4.cpp.

Definition at line 8795 of file hexrays.hpp.

References hexdsp.

◆ restore_user_defined_calls()

bool restore_user_defined_calls ( udcall_map_t *  udcalls,
ea_t  func_ea 
)

Restore user defined function calls from the database.

Parameters
udcallsptr to output buffer
func_eaentry address of the function
Returns
success

Definition at line 7277 of file hexrays.hpp.

References hexdsp.

◆ restore_user_iflags()

user_iflags_t * restore_user_iflags ( ea_t  func_ea)

Restore user defined citem iflags from the database.

Parameters
func_eathe entry address of the function
Returns
collection of user defined iflags. The returned object must be deleted by the caller using delete_user_iflags()
Examples:
hexrays_sample4.cpp.

Definition at line 8807 of file hexrays.hpp.

References hexdsp.

◆ restore_user_labels()

user_labels_t * restore_user_labels ( ea_t  func_ea)

Restore user defined labels from the database.

Parameters
func_eathe entry address of the function
Returns
collection of user defined labels. The returned object must be deleted by the caller using delete_user_labels()
Examples:
hexrays_sample4.cpp.

Definition at line 8789 of file hexrays.hpp.

References hexdsp.

◆ restore_user_lvar_settings()

bool restore_user_lvar_settings ( lvar_uservec_t lvinf,
ea_t  func_ea 
)

Restore user defined local variable settings in the database.

Parameters
func_eaentry address of the function
lvinfptr to output buffer
Returns
success
Examples:
hexrays_sample4.cpp.

Definition at line 7259 of file hexrays.hpp.

References hexdsp.

◆ restore_user_numforms()

user_numforms_t * restore_user_numforms ( ea_t  func_ea)

Restore user defined number formats from the database.

Parameters
func_eathe entry address of the function
Returns
collection of user defined number formats. The returned object must be deleted by the caller using delete_user_numforms()
Examples:
hexrays_sample4.cpp.

Definition at line 8801 of file hexrays.hpp.

References hexdsp.

◆ restore_user_unions()

user_unions_t * restore_user_unions ( ea_t  func_ea)

Restore user defined union field selections from the database.

Parameters
func_eathe entry address of the function
Returns
collection of union field selections The returned object must be deleted by the caller using delete_user_unions()

Definition at line 8813 of file hexrays.hpp.

References hexdsp.

◆ save_user_cmts()

void save_user_cmts ( ea_t  func_ea,
const user_cmts_t user_cmts 
)

Save user defined comments into the database.

Parameters
func_eathe entry address of the function
user_cmtscollection of user defined comments

Definition at line 8765 of file hexrays.hpp.

References hexdsp.

Referenced by cfunc_t::save_user_cmts().

◆ save_user_defined_calls()

void save_user_defined_calls ( ea_t  func_ea,
const udcall_map_t &  udcalls 
)

Save user defined local function calls into the database.

Parameters
func_eaentry address of the function
udcallsuser-specified info about user defined function calls

Definition at line 7283 of file hexrays.hpp.

References hexdsp.

◆ save_user_iflags()

void save_user_iflags ( ea_t  func_ea,
const user_iflags_t *  iflags 
)

Save user defined citem iflags into the database.

Parameters
func_eathe entry address of the function
iflagscollection of user defined citem iflags

Definition at line 8777 of file hexrays.hpp.

References hexdsp.

Referenced by cfunc_t::save_user_iflags().

◆ save_user_labels()

void save_user_labels ( ea_t  func_ea,
const user_labels_t user_labels 
)

Save user defined labels into the database.

Parameters
func_eathe entry address of the function
user_labelscollection of user defined labels

Definition at line 8759 of file hexrays.hpp.

References hexdsp.

Referenced by cfunc_t::save_user_labels().

◆ save_user_lvar_settings()

void save_user_lvar_settings ( ea_t  func_ea,
const lvar_uservec_t lvinf 
)

Save user defined local variable settings into the database.

Parameters
func_eaentry address of the function
lvinfuser-specified info about local variables

Definition at line 7265 of file hexrays.hpp.

References hexdsp.

◆ save_user_numforms()

void save_user_numforms ( ea_t  func_ea,
const user_numforms_t numforms 
)

Save user defined number formats into the database.

Parameters
func_eathe entry address of the function
numformscollection of user defined comments

Definition at line 8771 of file hexrays.hpp.

References hexdsp.

Referenced by cfunc_t::save_user_numforms().

◆ save_user_unions()

void save_user_unions ( ea_t  func_ea,
const user_unions_t *  unions 
)

Save user defined union field selections into the database.

Parameters
func_eathe entry address of the function
unionscollection of union field selections

Definition at line 8783 of file hexrays.hpp.

References hexdsp.

Referenced by cfunc_t::save_user_unions().

◆ send_database()

void send_database ( const hexrays_failure_t err,
bool  silent 
)

Send the database to Hex-Rays.

This function sends the current database to the hex-rays server. The database is sent in the compressed form over an encrypted (SSL) connection.

Parameters
errfailure description object. Empty hexrays_failure_t object can be used if error information is not available.
silentif false, a dialog box will be displayed before sending the database.

Definition at line 8323 of file hexrays.hpp.

References hexdsp.

Variable Documentation

◆ hexdsp

hexdsp_t* hexdsp

Pointer to Hex-Rays decompiler dispatcher.

This variable must be instantiated by the plugin. It is initialized by init_hexrays_plugin().

Examples:
hexrays_sample1.cpp, hexrays_sample10.cpp, hexrays_sample11.cpp, hexrays_sample12.cpp, hexrays_sample13.cpp, hexrays_sample14.cpp, hexrays_sample15.cpp, hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample4.cpp, hexrays_sample5.cpp, hexrays_sample6.cpp, hexrays_sample7.cpp, and hexrays_sample9.cpp.

Referenced by lvar_t::accepts_type(), mbl_array_t::alloc_lvars(), mbl_array_t::analyze_calls(), udc_filter_t::apply(), ctree_visitor_t::apply_to(), ctree_visitor_t::apply_to_exprs(), arglocs_overlap(), asgop(), asgop_revert(), cnumber_t::assign(), block_chains_begin(), block_chains_clear(), block_chains_end(), block_chains_erase(), block_chains_find(), block_chains_first(), block_chains_free(), block_chains_insert(), block_chains_new(), block_chains_next(), block_chains_prev(), block_chains_second(), block_chains_size(), boundaries_begin(), boundaries_clear(), boundaries_end(), boundaries_erase(), boundaries_find(), boundaries_first(), boundaries_free(), boundaries_insert(), boundaries_new(), boundaries_next(), boundaries_prev(), boundaries_second(), boundaries_size(), cfunc_t::build_c_tree(), mbl_array_t::build_graph(), vdui_t::calc_cmt_type(), cfunc_parentee_t::calc_rvalue_type(), cexpr_t::calc_type(), cexpr_t::cleanup(), cinsn_t::cleanup(), vdui_t::clear(), clear_cached_cfuncs(), close_pseudocode(), vdui_t::collapse_item(), vdui_t::collapse_lvars(), cinsn_t::collect_free_breaks(), cinsn_t::collect_free_continues(), cinsn_t::contains_insn(), citem_t::contains_label(), cexpr_t::contains_operator(), convert_to_user_call(), cinsn_t::create_if(), create_typedef(), vdui_t::ctree_to_disasm(), decompile_many(), cfunc_t::del_orphan_cmts(), vdui_t::del_orphan_cmts(), dereference(), dummy_ptrtype(), mbl_array_t::dump(), eamap_begin(), eamap_clear(), eamap_end(), eamap_erase(), eamap_find(), eamap_first(), eamap_free(), eamap_insert(), eamap_new(), eamap_next(), eamap_prev(), eamap_second(), eamap_size(), vdui_t::edit_cmt(), vdui_t::edit_func_cmt(), cexpr_t::equal_effect(), lvars_t::find(), mblock_t::find_access(), cfunc_t::find_label(), lvars_t::find_lvar(), citem_t::find_parent_of(), lvars_t::find_stkvar(), gen_microcode(), cfunc_t::get_boundaries(), vdui_t::get_current_item(), vdui_t::get_current_label(), ctree_item_t::get_ea(), cfunc_t::get_eamap(), get_float_type(), cfunc_t::get_func_type(), mbl_array_t::get_graph(), get_hexrays_version(), cexpr_t::get_high_nbit_bound(), get_int_type_by_width_and_sign(), ctree_item_t::get_label_num(), cfunc_t::get_line_item(), cexpr_t::get_low_nbit_bound(), ctree_item_t::get_lvar(), cfunc_t::get_lvars(), get_member_type(), ctree_item_t::get_memptr(), get_merror_desc(), vdui_t::get_number(), get_op_signness(), cfunc_t::get_pseudocode(), lvar_locator_t::get_regnum(), cfunc_t::get_stkoff_delta(), get_type(), get_unk_type(), cfunc_t::get_user_cmt(), cfunc_t::get_user_iflags(), cfunc_t::get_user_union_selection(), cfunc_t::get_warnings(), get_widget_vdui(), getb_reginsn(), getf_reginsn(), has_cached_cfunc(), cfunc_t::has_orphan_cmts(), cexpr_t::has_side_effects(), install_hexrays_callback(), install_microcode_filter(), vdui_t::invert_bits(), vdui_t::invert_sign(), is_bool_type(), cexpr_t::is_child_of(), is_nonbool_type(), cinsn_t::is_ordinary_flow(), is_small_struni(), is_type_correct(), vdui_t::jump_enter(), lnot(), lvar_mapping_begin(), lvar_mapping_clear(), lvar_mapping_end(), lvar_mapping_erase(), lvar_mapping_find(), lvar_mapping_first(), lvar_mapping_free(), lvar_mapping_insert(), lvar_mapping_new(), lvar_mapping_next(), lvar_mapping_prev(), lvar_mapping_second(), lvar_mapping_size(), make_num(), make_pointer(), make_ref(), vdui_t::map_lvar(), mark_cfunc_dirty(), modify_user_lvars(), mreg2reg(), negated_relation(), new_block(), cinsn_t::new_insn(), open_pseudocode(), mbl_array_t::optimize_global(), mbl_array_t::optimize_local(), parse_user_call(), partial_type_num(), cnumber_t::print(), cinsn_t::print(), cexpr_t::print1(), cinsn_t::print1(), cfunc_t::print_dcl(), cfunc_t::print_func(), cexpr_t::put_number(), ctree_parentee_t::recalc_parent_types(), vdui_t::refresh_cpos(), vdui_t::refresh_ctext(), vdui_t::refresh_view(), reg2mreg(), remove_hexrays_callback(), cfunc_t::remove_unused_labels(), vdui_t::rename_global(), vdui_t::rename_label(), vdui_t::rename_lvar(), vdui_t::rename_strmem(), cexpr_t::replace_by(), cinsn_t::replace_by(), cexpr_t::requires_lvalue(), restore_user_cmts(), restore_user_defined_calls(), restore_user_iflags(), restore_user_labels(), restore_user_lvar_settings(), restore_user_numforms(), restore_user_unions(), save_user_cmts(), save_user_defined_calls(), save_user_iflags(), save_user_labels(), save_user_lvar_settings(), save_user_numforms(), save_user_unions(), send_database(), vdui_t::set_global_type(), vdui_t::set_lvar_cmt(), lvar_t::set_lvar_type(), vdui_t::set_lvar_type(), vdui_t::set_num_enum(), vdui_t::set_num_radix(), vdui_t::set_num_stroff(), vdui_t::set_strmem_type(), set_type(), cfunc_t::set_user_cmt(), cfunc_t::set_user_iflags(), cfunc_t::set_user_union_selection(), lvar_t::set_width(), vdui_t::split_item(), vdui_t::switch_to(), term_hexrays_plugin(), udcall_map_begin(), udcall_map_clear(), udcall_map_end(), udcall_map_erase(), udcall_map_find(), udcall_map_first(), udcall_map_free(), udcall_map_insert(), udcall_map_new(), udcall_map_next(), udcall_map_prev(), udcall_map_second(), udcall_map_size(), vdui_t::ui_edit_lvar_cmt(), vdui_t::ui_map_lvar(), vdui_t::ui_rename_lvar(), vdui_t::ui_set_call_type(), vdui_t::ui_set_lvar_type(), vdui_t::ui_unmap_lvar(), user_cmts_begin(), user_cmts_clear(), user_cmts_end(), user_cmts_erase(), user_cmts_find(), user_cmts_first(), user_cmts_free(), user_cmts_insert(), user_cmts_new(), user_cmts_next(), user_cmts_prev(), user_cmts_second(), user_cmts_size(), user_iflags_begin(), user_iflags_clear(), user_iflags_end(), user_iflags_erase(), user_iflags_find(), user_iflags_first(), user_iflags_free(), user_iflags_insert(), user_iflags_new(), user_iflags_next(), user_iflags_prev(), user_iflags_second(), user_iflags_size(), user_labels_begin(), user_labels_clear(), user_labels_end(), user_labels_erase(), user_labels_find(), user_labels_first(), user_labels_free(), user_labels_insert(), user_labels_new(), user_labels_next(), user_labels_prev(), user_labels_second(), user_labels_size(), user_numforms_begin(), user_numforms_clear(), user_numforms_end(), user_numforms_erase(), user_numforms_find(), user_numforms_first(), user_numforms_free(), user_numforms_insert(), user_numforms_new(), user_numforms_next(), user_numforms_prev(), user_numforms_second(), user_numforms_size(), user_unions_begin(), user_unions_clear(), user_unions_end(), user_unions_erase(), user_unions_find(), user_unions_first(), user_unions_free(), user_unions_insert(), user_unions_new(), user_unions_next(), user_unions_prev(), user_unions_second(), user_unions_size(), cnumber_t::value(), and cfunc_t::verify().