IDA C++ SDK 9.2
|
Decompiled function. Decompilation result is kept here. More...
#include <hexrays.hpp>
Public Member Functions | |
cfunc_t (mba_t *mba) | |
~cfunc_t () | |
void | release () |
HEXRAYS_MEMORY_ALLOCATION_FUNCS () void hexapi build_c_tree() | |
Generate the function body. | |
void hexapi | verify (allow_unused_labels_t aul, bool even_without_debugger) const |
Verify the ctree. | |
void hexapi | print_dcl (qstring *vout) const |
Print function prototype. | |
void hexapi | print_func (vc_printer_t &vp) const |
Print function text. | |
bool hexapi | get_func_type (tinfo_t *type) const |
Get the function type. | |
lvars_t *hexapi | get_lvars () |
Get vector of local variables. | |
sval_t hexapi | get_stkoff_delta () |
Get stack offset delta. | |
citem_t *hexapi | find_label (int label) |
Find the label. | |
void hexapi | remove_unused_labels () |
Remove unused labels. | |
const char *hexapi | get_user_cmt (const treeloc_t &loc, cmt_retrieval_type_t rt) const |
Retrieve a user defined comment. | |
void hexapi | set_user_cmt (const treeloc_t &loc, const char *cmt) |
Set a user defined comment. | |
int32 hexapi | get_user_iflags (const citem_locator_t &loc) const |
Retrieve citem iflags. | |
void hexapi | set_user_iflags (const citem_locator_t &loc, int32 iflags) |
Set citem iflags. | |
bool hexapi | has_orphan_cmts () const |
Check if there are orphan comments. | |
int hexapi | del_orphan_cmts () |
Delete all orphan comments. | |
bool hexapi | get_user_union_selection (ea_t ea, intvec_t *path) |
Retrieve a user defined union field selection. | |
void hexapi | set_user_union_selection (ea_t ea, const intvec_t &path) |
Set a union field selection. | |
void hexapi | save_user_labels () const |
Save user-defined labels into the database. | |
void hexapi | save_user_cmts () const |
Save user-defined comments into the database. | |
void hexapi | save_user_numforms () const |
Save user-defined number formats into the database. | |
void hexapi | save_user_iflags () const |
Save user-defined iflags into the database. | |
void hexapi | save_user_unions () const |
Save user-defined union field selections into the database. | |
bool hexapi | get_line_item (const char *line, int x, bool is_ctree_line, ctree_item_t *phead, ctree_item_t *pitem, ctree_item_t *ptail) |
Get ctree item for the specified cursor position. | |
hexwarns_t &hexapi | get_warnings () |
Get information about decompilation warnings. | |
eamap_t &hexapi | get_eamap () |
Get pointer to ea->insn map. | |
boundaries_t &hexapi | get_boundaries () |
Get pointer to map of instruction boundaries. | |
const strvec_t &hexapi | get_pseudocode () |
Get pointer to decompilation output: the pseudocode. | |
void hexapi | refresh_func_ctext () |
Refresh ctext after a ctree modification. | |
void hexapi | recalc_item_addresses () |
Recalculate item adresses. | |
bool hexapi | gather_derefs (const ctree_item_t &ci, udt_type_data_t *udm=nullptr) const |
bool hexapi | find_item_coords (const citem_t *item, int *px, int *py) |
bool | locked () const |
Public Attributes | |
ea_t | entry_ea |
function entry address | |
mba_t * | mba |
underlying microcode | |
cinsn_t | body |
function body, must be a block | |
intvec_t & | argidx |
list of arguments (indexes into vars) | |
ctree_maturity_t | maturity |
maturity level | |
user_labels_t * | user_labels |
user-defined labels. | |
user_cmts_t * | user_cmts |
user-defined comments. | |
user_numforms_t * | numforms |
user-defined number formats. | |
user_iflags_t * | user_iflags |
user-defined item flags ctree item iflags bits | |
user_unions_t * | user_unions |
user-defined union field selections. | |
int | refcnt |
reference count to this object. use cfuncptr_t | |
int | statebits |
current cfunc_t state. | |
eamap_t * | eamap |
ea->insn map. use get_eamap | |
boundaries_t * | boundaries |
map of instruction boundaries. use get_boundaries | |
strvec_t | sv |
decompilation output: function text. use get_pseudocode | |
int | hdrlines |
number of lines in the declaration area | |
citem_pointers_t | treeitems |
vector of pointers to citem_t objects (nodes constituting the ctree) | |
char | reserved [] |
Decompiled function. Decompilation result is kept here.
cfunc_t::cfunc_t | ( | mba_t * | mba | ) |
|
inline |
|
inline |
cfunc_t::HEXRAYS_MEMORY_ALLOCATION_FUNCS | ( | ) |
Generate the function body.
This function (re)generates the function body from the underlying microcode.
|
inline |
Verify the ctree.
This function verifies the ctree. If the ctree is malformed, an internal error is generated. Use it to verify the ctree after your modifications.
aul | Are unused labels acceptable? |
even_without_debugger | if false and there is no debugger, the verification will be skipped |
Print function prototype.
vout | output buffer |
|
inline |
Print function text.
vp | printer helper class to receive the generated text. |
Get the function type.
type | variable where the function type is returned |
|
inline |
Get vector of local variables.
|
inline |
Get stack offset delta.
The local variable stack offsets retrieved by v.location.stkoff() should be adjusted before being used as stack frame offsets in IDA.
|
inline |
Find the label.
|
inline |
Remove unused labels.
This function checks what labels are really used by the function and removes the unused ones. You must call it after deleting a goto statement.
|
inline |
Retrieve a user defined comment.
loc | ctree location |
rt | should already retrieved comments retrieved again? |
Set a user defined comment.
This function stores the specified comment in the cfunc_t structure. The save_user_cmts() function must be called after it.
loc | ctree location |
cmt | new comment. if empty or nullptr, then an existing comment is deleted. |
|
inline |
|
inline |
Set citem iflags.
loc | citem locator |
iflags | new iflags |
|
inline |
Check if there are orphan comments.
|
inline |
Delete all orphan comments.
The save_user_cmts() function must be called after this call.
Retrieve a user defined union field selection.
ea | address |
path | out: path describing the union selection. |
Set a union field selection.
The save_user_unions() function must be called after calling this function.
ea | address |
path | in: path describing the union selection. |
|
inline |
Save user-defined labels into the database.
|
inline |
Save user-defined comments into the database.
|
inline |
Save user-defined number formats into the database.
|
inline |
Save user-defined iflags into the database.
|
inline |
Save user-defined union field selections into the database.
|
inline |
Get ctree item for the specified cursor position.
line | line of decompilation text (element of sv) |
x | x cursor coordinate in the line |
is_ctree_line | does the line belong to statement area? (if not, it is assumed to belong to the declaration area) |
phead | ptr to the first item on the line (used to attach block comments). May be nullptr |
pitem | ptr to the current item. May be nullptr |
ptail | ptr to the last item on the line (used to attach indented comments). May be nullptr |
|
inline |
Get information about decompilation warnings.
|
inline |
Get pointer to ea->insn map.
This function initializes eamap if not done yet.
|
inline |
Get pointer to map of instruction boundaries.
This function initializes the boundary map if not done yet.
|
inline |
Get pointer to decompilation output: the pseudocode.
This function generates pseudocode if not done yet.
|
inline |
|
inline |
Recalculate item adresses.
This function may be required after shuffling ctree items. For example, when adding or removing statements of a block, or changing 'if' statements.
|
inline |
|
inline |
ea_t cfunc_t::entry_ea |
function entry address
mba_t* cfunc_t::mba |
underlying microcode
cinsn_t cfunc_t::body |
function body, must be a block
intvec_t& cfunc_t::argidx |
list of arguments (indexes into vars)
ctree_maturity_t cfunc_t::maturity |
maturity level
user_labels_t* cfunc_t::user_labels |
user-defined labels.
user_cmts_t* cfunc_t::user_cmts |
user-defined comments.
user_numforms_t* cfunc_t::numforms |
user-defined number formats.
user_iflags_t* cfunc_t::user_iflags |
user-defined item flags ctree item iflags bits
user_unions_t* cfunc_t::user_unions |
user-defined union field selections.
int cfunc_t::refcnt |
reference count to this object. use cfuncptr_t
int cfunc_t::statebits |
current cfunc_t state.
see cfunc state bits
boundaries_t* cfunc_t::boundaries |
map of instruction boundaries. use get_boundaries
strvec_t cfunc_t::sv |
decompilation output: function text. use get_pseudocode
int cfunc_t::hdrlines |
number of lines in the declaration area
|
mutable |
vector of pointers to citem_t objects (nodes constituting the ctree)
char cfunc_t::reserved[] |