Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
Functions: work with compiler IDs

Modules

 Set compiler flags
 

Typedefs

typedef qvector< comp_tcompvec_t
 Collection of compiler descriptions.
 

Functions

THREAD_SAFE comp_t get_comp (comp_t comp)
 Get compiler bits.
 
idaman const char *ida_export get_compiler_name (comp_t id)
 Get full compiler name.
 
idaman const char *ida_export get_compiler_abbr (comp_t id)
 Get abbreviated compiler name.
 
idaman void ida_export get_compilers (compvec_t *ids, qstrvec_t *names, qstrvec_t *abbrs)
 Get names of all built-in compilers.
 
THREAD_SAFE comp_t is_comp_unsure (comp_t comp)
 See COMP_UNSURE.
 
comp_t default_compiler ()
 Get compiler specified by inf.cc.
 
bool is_gcc ()
 Is the target compiler COMP_GNU?
 
bool is_gcc32 ()
 Is the target compiler 32 bit gcc?
 
bool is_gcc64 ()
 Is the target compiler 64 bit gcc?
 
bool gcc_layout ()
 Should use the struct/union layout as done by gcc?
 
idaman bool ida_export set_compiler (const compiler_info_t &cc, int flags, const char *abiname=nullptr)
 Change current compiler. More...
 
bool idaapi set_compiler_id (comp_t id, const char *abiname=nullptr)
 Set the compiler id (see Compiler IDs)
 
bool idaapi set_abi_name (const char *abiname, bool user_level=false)
 Set abi name (see Compiler IDs)
 
idaman ssize_t ida_export get_abi_name (qstring *out)
 Get ABI name. More...
 
idaman bool ida_export append_abi_opts (const char *abi_opts, bool user_level=false)
 Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-... or -opt1-opt2-... More...
 
idaman bool ida_export remove_abi_opts (const char *abi_opts, bool user_level=false)
 
idaman bool ida_export set_compiler_string (const char *compstr, bool user_level)
 
bool use_golang_cc ()
 is GOLANG calling convention used by default?
 
void switch_to_golang ()
 switch to GOLANG calling convention (to be used as default CC)
 

Detailed Description

Function Documentation

◆ set_compiler()

idaman bool ida_export set_compiler ( const compiler_info_t cc,
int  flags,
const char *  abiname = nullptr 
)

Change current compiler.

Parameters
cccompiler to switch to
flagsSet compiler flags
abinameABI name
Returns
success

◆ get_abi_name()

idaman ssize_t ida_export get_abi_name ( qstring out)

Get ABI name.

Returns
length of the name (>=0)

◆ append_abi_opts()

idaman bool ida_export append_abi_opts ( const char *  abi_opts,
bool  user_level = false 
)

Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-... or -opt1-opt2-...

Parameters
abi_opts- ABI options to add/remove in form opt1-opt2-...
user_level- initiated by user if TRUE (==SETCOMP_BY_USER)
Returns
success

◆ set_compiler_string()

idaman bool ida_export set_compiler_string ( const char *  compstr,
bool  user_level 
)
Parameters
compstr- compiler description in form <abbr>:<abiname>
user_level- initiated by user if TRUE
Returns
success