IDAPython 8.4
Loading...
Searching...
No Matches
ida_funcs Namespace Reference

Detailed Description

Routines for working with functions within the disassembled program.

This file also contains routines for working with library signatures (e.g.
FLIRT).

Each function consists of function chunks. At least one function chunk must be
present in the function definition - the function entry chunk. Other chunks are
called function tails. There may be several of them for a function.

A function tail is a continuous range of addresses. It can be used in the
definition of one or more functions. One function using the tail is singled out
and called the tail owner. This function is considered as 'possessing' the tail.
get_func() on a tail address will return the function possessing the tail. You
can enumerate the functions using the tail by using func_parent_iterator_t.

Each function chunk in the disassembly is represented as an "range" (a range of
addresses, see range.hpp for details) with characteristics.

A function entry must start with an instruction (code) byte.

Classes

class  dyn_ea_array
 Proxy of C++ dynamic_wrapped_array_t< ea_t > class. More...
 
class  dyn_range_array
 Proxy of C++ dynamic_wrapped_array_t< range_t > class. More...
 
class  dyn_regarg_array
 Proxy of C++ dynamic_wrapped_array_t< regarg_t > class. More...
 
class  dyn_regvar_array
 Proxy of C++ dynamic_wrapped_array_t< regvar_t > class. More...
 
class  dyn_stkpnt_array
 Proxy of C++ dynamic_wrapped_array_t< stkpnt_t > class. More...
 
class  func_item_iterator_t
 Proxy of C++ func_item_iterator_t class. More...
 
class  func_parent_iterator_t
 Proxy of C++ func_parent_iterator_t class. More...
 
class  func_t
 Proxy of C++ func_t class. More...
 
class  func_tail_iterator_t
 Proxy of C++ func_tail_iterator_t class. More...
 
class  lock_func
 Proxy of C++ lock_func class. More...
 
class  lock_func_with_tails_t
 Proxy of C++ lock_func_with_tails_t class. More...
 
class  regarg_t
 Proxy of C++ regarg_t class. More...
 

Functions

"void" free_regarg (*args)
 free_regarg(v)
 
"bool" is_func_entry (*args)
 is_func_entry(pfn) -> bool Does function describe a function entry chunk?
 
"bool" is_func_tail (*args)
 is_func_tail(pfn) -> bool Does function describe a function tail chunk?
 
"void" lock_func_range (*args)
 lock_func_range(pfn, lock) Lock function pointer Locked pointers are guaranteed to remain valid until they are unlocked.
 
"bool" is_func_locked (*args)
 is_func_locked(pfn) -> bool Is the function pointer locked?
 
"func_t *" get_func (*args)
 get_func(ea) -> func_t Get pointer to function structure by address.
 
"int" get_func_chunknum (*args)
 get_func_chunknum(pfn, ea) -> int Get the containing tail chunk of 'ea'.
 
"bool" func_contains (*args)
 func_contains(pfn, ea) -> bool Does the given function contain the given address?
 
"bool" is_same_func (*args)
 is_same_func(ea1, ea2) -> bool Do two addresses belong to the same function?
 
"func_t *" getn_func (*args)
 getn_func(n) -> func_t Get pointer to function structure by number.
 
"size_t" get_func_qty (*args)
 get_func_qty() -> size_t Get total number of functions in the program.
 
"int" get_func_num (*args)
 get_func_num(ea) -> int Get ordinal number of a function.
 
"func_t *" get_prev_func (*args)
 get_prev_func(ea) -> func_t Get pointer to the previous function.
 
"func_t *" get_next_func (*args)
 get_next_func(ea) -> func_t Get pointer to the next function.
 
"ea_t" get_func_ranges (*args)
 get_func_ranges(ranges, pfn) -> ea_t Get function ranges.
 
"qstring *" get_func_cmt (*args)
 get_func_cmt(pfn, repeatable) -> str Get function comment.
 
"bool" set_func_cmt (*args)
 set_func_cmt(pfn, cmt, repeatable) -> bool Set function comment.
 
"bool" update_func (*args)
 update_func(pfn) -> bool Update information about a function in the database (func_t).
 
"bool" add_func_ex (*args)
 add_func_ex(pfn) -> bool Add a new function.
 
"bool" add_func (*args)
 add_func(ea1, ea2=BADADDR) -> bool Add a new function.
 
"bool" del_func (*args)
 del_func(ea) -> bool Delete a function.
 
"int" set_func_start (*args)
 set_func_start(ea, newstart) -> int Move function chunk start address.
 
"bool" set_func_end (*args)
 set_func_end(ea, newend) -> bool Move function chunk end address.
 
"void" reanalyze_function (*args)
 reanalyze_function(pfn, ea1=0, ea2=BADADDR, analyze_parents=False) Reanalyze a function.
 
"int" find_func_bounds (*args)
 find_func_bounds(nfn, flags) -> int Determine the boundaries of a new function.
 
"qstring *" get_func_name (*args)
 get_func_name(ea) -> str Get function name.
 
"asize_t" calc_func_size (*args)
 calc_func_size(pfn) -> asize_t Calculate function size.
 
"int" get_func_bitness (*args)
 get_func_bitness(pfn) -> int Get function bitness (which is equal to the function segment bitness).
 
"int" get_func_bits (*args)
 get_func_bits(pfn) -> int Get number of bits in the function addressing.
 
"int" get_func_bytes (*args)
 get_func_bytes(pfn) -> int Get number of bytes in the function addressing.
 
"bool" is_visible_func (*args)
 is_visible_func(pfn) -> bool Is the function visible (not hidden)?
 
"bool" is_finally_visible_func (*args)
 is_finally_visible_func(pfn) -> bool Is the function visible (event after considering SCF_SHHID_FUNC)?
 
"void" set_visible_func (*args)
 set_visible_func(pfn, visible) Set visibility of function.
 
"int" set_func_name_if_jumpfunc (*args)
 set_func_name_if_jumpfunc(pfn, oldname) -> int Give a meaningful name to function if it consists of only 'jump' instruction.
 
"ea_t *" calc_thunk_func_target (*args)
 calc_thunk_func_target(pfn) -> ea_t Calculate target of a thunk function.
 
"bool" func_does_return (*args)
 func_does_return(callee) -> bool Does the function return?.
 
"bool" reanalyze_noret_flag (*args)
 reanalyze_noret_flag(ea) -> bool Plan to reanalyze noret flag.
 
"bool" set_noret_insn (*args)
 set_noret_insn(insn_ea, noret) -> bool Signal a non-returning instruction.
 
"func_t *" get_fchunk (*args)
 get_fchunk(ea) -> func_t Get pointer to function chunk structure by address.
 
"func_t *" getn_fchunk (*args)
 getn_fchunk(n) -> func_t Get pointer to function chunk structure by number.
 
"size_t" get_fchunk_qty (*args)
 get_fchunk_qty() -> size_t Get total number of function chunks in the program.
 
"int" get_fchunk_num (*args)
 get_fchunk_num(ea) -> int Get ordinal number of a function chunk in the global list of function chunks.
 
"func_t *" get_prev_fchunk (*args)
 get_prev_fchunk(ea) -> func_t Get pointer to the previous function chunk in the global list.
 
"func_t *" get_next_fchunk (*args)
 get_next_fchunk(ea) -> func_t Get pointer to the next function chunk in the global list.
 
"bool" append_func_tail (*args)
 append_func_tail(pfn, ea1, ea2) -> bool Append a new tail chunk to the function definition.
 
"bool" remove_func_tail (*args)
 remove_func_tail(pfn, tail_ea) -> bool Remove a function tail.
 
"bool" set_tail_owner (*args)
 set_tail_owner(fnt, new_owner) -> bool Set a new owner of a function tail.
 
"bool" func_tail_iterator_set (*args)
 func_tail_iterator_set(fti, pfn, ea) -> bool
 
"bool" func_tail_iterator_set_ea (*args)
 func_tail_iterator_set_ea(fti, ea) -> bool
 
"bool" func_parent_iterator_set (*args)
 func_parent_iterator_set(fpi, pfn) -> bool
 
"bool" f_any (*args)
 f_any(arg1, arg2) -> bool Helper function to accept any address.
 
"ea_t" get_prev_func_addr (*args)
 get_prev_func_addr(pfn, ea) -> ea_t
 
"ea_t" get_next_func_addr (*args)
 get_next_func_addr(pfn, ea) -> ea_t
 
"void" read_regargs (*args)
 read_regargs(pfn)
 
"void" add_regarg (*args)
 add_regarg(pfn, reg, tif, name)
 
"int" plan_to_apply_idasgn (*args)
 plan_to_apply_idasgn(fname) -> int Add a signature file to the list of planned signature files.
 
"int" apply_idasgn_to (*args)
 apply_idasgn_to(signame, ea, is_startup) -> int Apply a signature file to the specified address.
 
"int" get_idasgn_qty (*args)
 get_idasgn_qty() -> int Get number of signatures in the list of planned and applied signatures.
 
"int" get_current_idasgn (*args)
 get_current_idasgn() -> int Get number of the the current signature.
 
"int" calc_idasgn_state (*args)
 calc_idasgn_state(n) -> int Get state of a signature in the list of planned signatures
 
"int" del_idasgn (*args)
 del_idasgn(n) -> int Remove signature from the list of planned signatures.
 
"qstring *" get_idasgn_title (*args)
 get_idasgn_title(name) -> str Get full description of the signature by its short name.
 
"bool" apply_startup_sig (*args)
 apply_startup_sig(ea, startup) -> bool Apply a startup signature file to the specified address.
 
"int" try_to_add_libfunc (*args)
 try_to_add_libfunc(ea) -> int Apply the currently loaded signature file to the specified address.
 
"ea_t" get_fchunk_referer (*args)
 get_fchunk_referer(ea, idx) -> ea_t
 
"PyObject *" get_idasgn_desc (*args)
 get_idasgn_desc(n) -> (str, str) Get information about a signature in the list.
 
"PyObject *" get_idasgn_desc_with_matches (*args)
 get_idasgn_desc_with_matches(n) -> (str, str, int) Get information about a signature in the list.
 
"func_t *" func_t__from_ptrval__ (*args)
 func_t__from_ptrval__(ptrval) -> func_t
 

Variables

 FUNC_NORET = _ida_funcs.FUNC_NORET
 
 FUNC_FAR = _ida_funcs.FUNC_FAR
 
 FUNC_LIB = _ida_funcs.FUNC_LIB
 
 FUNC_STATICDEF = _ida_funcs.FUNC_STATICDEF
 
 FUNC_FRAME = _ida_funcs.FUNC_FRAME
 
 FUNC_USERFAR = _ida_funcs.FUNC_USERFAR
 
 FUNC_HIDDEN = _ida_funcs.FUNC_HIDDEN
 
 FUNC_THUNK = _ida_funcs.FUNC_THUNK
 
 FUNC_BOTTOMBP = _ida_funcs.FUNC_BOTTOMBP
 
 FUNC_NORET_PENDING = _ida_funcs.FUNC_NORET_PENDING
 
 FUNC_SP_READY = _ida_funcs.FUNC_SP_READY
 
 FUNC_FUZZY_SP = _ida_funcs.FUNC_FUZZY_SP
 
 FUNC_PROLOG_OK = _ida_funcs.FUNC_PROLOG_OK
 
 FUNC_PURGED_OK = _ida_funcs.FUNC_PURGED_OK
 
 FUNC_TAIL = _ida_funcs.FUNC_TAIL
 
 FUNC_LUMINA = _ida_funcs.FUNC_LUMINA
 
 FUNC_OUTLINE = _ida_funcs.FUNC_OUTLINE
 
 FUNC_REANALYZE = _ida_funcs.FUNC_REANALYZE
 
 MOVE_FUNC_OK = _ida_funcs.MOVE_FUNC_OK
 
 MOVE_FUNC_NOCODE = _ida_funcs.MOVE_FUNC_NOCODE
 
 MOVE_FUNC_BADSTART = _ida_funcs.MOVE_FUNC_BADSTART
 
 MOVE_FUNC_NOFUNC = _ida_funcs.MOVE_FUNC_NOFUNC
 
 MOVE_FUNC_REFUSED = _ida_funcs.MOVE_FUNC_REFUSED
 
 FIND_FUNC_NORMAL = _ida_funcs.FIND_FUNC_NORMAL
 
 FIND_FUNC_DEFINE = _ida_funcs.FIND_FUNC_DEFINE
 
 FIND_FUNC_IGNOREFN = _ida_funcs.FIND_FUNC_IGNOREFN
 
 FIND_FUNC_KEEPBD = _ida_funcs.FIND_FUNC_KEEPBD
 
 FIND_FUNC_UNDEF = _ida_funcs.FIND_FUNC_UNDEF
 
 FIND_FUNC_OK = _ida_funcs.FIND_FUNC_OK
 
 FIND_FUNC_EXIST = _ida_funcs.FIND_FUNC_EXIST
 
 IDASGN_OK = _ida_funcs.IDASGN_OK
 
 IDASGN_BADARG = _ida_funcs.IDASGN_BADARG
 
 IDASGN_APPLIED = _ida_funcs.IDASGN_APPLIED
 
 IDASGN_CURRENT = _ida_funcs.IDASGN_CURRENT
 
 IDASGN_PLANNED = _ida_funcs.IDASGN_PLANNED
 
 LIBFUNC_FOUND = _ida_funcs.LIBFUNC_FOUND
 
 LIBFUNC_NONE = _ida_funcs.LIBFUNC_NONE
 
 LIBFUNC_DELAY = _ida_funcs.LIBFUNC_DELAY
 

Function Documentation

◆ add_func()

"bool" add_func ( * args)

If the function end address is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(..., FIND_FUNC_DEFINE).

Parameters
ea1(C++: ea_t) start address
ea2(C++: ea_t) end address
Returns
: success

◆ add_func_ex()

"bool" add_func_ex ( * args)

If the fn->end_ea is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(..., FIND_FUNC_DEFINE).

Parameters
pfn(C++: func_t *) ptr to filled function structure
Returns
: success

◆ add_regarg()

"void" add_regarg ( * args)
Parameters
pfnfunc_t *
regint
tiftinfo_t const &
namechar const *

◆ append_func_tail()

"bool" append_func_tail ( * args)

If the tail already exists, then it will simply be added to the function tail list Otherwise a new tail will be created and its owner will be set to be our function If a new tail cannot be created, then this function will fail.

Parameters
pfn(C++: func_t *) pointer to the function
ea1(C++: ea_t) start of the tail. If a tail already exists at the specified address it must start at 'ea1'
ea2(C++: ea_t) end of the tail. If a tail already exists at the specified address it must end at 'ea2'. If specified as BADADDR, IDA will determine the end address itself.

◆ apply_idasgn_to()

"int" apply_idasgn_to ( * args)
Parameters
signame(C++: const char *) short name of signature file (the file name without path)
ea(C++: ea_t) address to apply the signature
is_startup(C++: bool) if set, then the signature is treated as a startup one for startup signature ida doesn't rename the first function of the applied module.
Returns
: Library function codes

◆ apply_startup_sig()

"bool" apply_startup_sig ( * args)
Parameters
ea(C++: ea_t) address to apply the signature to; usually idainfo::start_ea
startup(C++: const char *) the name of the signature file without path and extension
Returns
: true if successfully applied the signature

◆ calc_func_size()

"asize_t" calc_func_size ( * args)

This function takes into account all fragments of the function.

Parameters
pfn(C++: func_t *) ptr to function structure

◆ calc_idasgn_state()

"int" calc_idasgn_state ( * args)
Parameters
n(C++: int) number of signature in the list (0..get_idasgn_qty()-1)
Returns
: state of signature or IDASGN_BADARG

◆ calc_thunk_func_target()

"ea_t *" calc_thunk_func_target ( * args)
Parameters
pfn(C++: func_t *) pointer to function (may not be nullptr)
Returns
: the target function or BADADDR

◆ del_func()

"bool" del_func ( * args)
Parameters
ea(C++: ea_t) any address in the function entry chunk
Returns
: success

◆ del_idasgn()

"int" del_idasgn ( * args)
Parameters
n(C++: int) number of signature in the list (0..get_idasgn_qty()-1)
Returns
: IDASGN_OK, IDASGN_BADARG, IDASGN_APPLIED

◆ f_any()

"bool" f_any ( * args)
Parameters
arg1flags64_t
arg2void *

◆ find_func_bounds()

"int" find_func_bounds ( * args)

This function tries to find the start and end addresses of a new function. It calls the module with processor_t::func_bounds in order to fine tune the function boundaries.

Parameters
nfn(C++: func_t *) structure to fill with information \ nfn->start_ea points to the start address of the new function.
flags(C++: int) Find function bounds flags
Returns
: Find function bounds result codes

◆ free_regarg()

"void" free_regarg ( * args)
Parameters
vregarg_t *

◆ func_contains()

"bool" func_contains ( * args)
Parameters
pfn(C++: func_t *)
ea(C++: ea_t)

◆ func_does_return()

"bool" func_does_return ( * args)

To calculate the answer, FUNC_NORET flag and is_noret() are consulted The latter is required for imported functions in the .idata section. Since in .idata we have only function pointers but not functions, we have to introduce a special flag for them.

Parameters
callee(C++: ea_t)

◆ func_parent_iterator_set()

"bool" func_parent_iterator_set ( * args)
Parameters
fpifunc_parent_iterator_t *
pfnfunc_t *

◆ func_t__from_ptrval__()

"func_t *" func_t__from_ptrval__ ( * args)
Parameters
ptrvalsize_t

◆ func_tail_iterator_set()

"bool" func_tail_iterator_set ( * args)
Parameters
ftifunc_tail_iterator_t *
pfnfunc_t *
eaea_t

◆ func_tail_iterator_set_ea()

"bool" func_tail_iterator_set_ea ( * args)
Parameters
ftifunc_tail_iterator_t *
eaea_t

◆ get_current_idasgn()

"int" get_current_idasgn ( * args)
Returns
: 0..n-1

◆ get_fchunk()

"func_t *" get_fchunk ( * args)
Parameters
ea(C++: ea_t) any address in a function chunk
Returns
: ptr to a function chunk or nullptr. This function may return a function entry as well as a function tail.

◆ get_fchunk_num()

"int" get_fchunk_num ( * args)
Parameters
ea(C++: ea_t) any address in the function chunk
Returns
: number of function chunk (0..get_fchunk_qty()-1). -1 means 'no function chunk at the specified address'.

◆ get_fchunk_qty()

"size_t" get_fchunk_qty ( * args)

◆ get_fchunk_referer()

"ea_t" get_fchunk_referer ( * args)
Parameters
eaea_t
idxsize_t

◆ get_func()

"func_t *" get_func ( * args)
Parameters
ea(C++: ea_t) any address in a function
Returns
: ptr to a function or nullptr. This function returns a function entry chunk.

◆ get_func_bitness()

"int" get_func_bitness ( * args)

pfn==nullptr => returns 0

Return values
016
132
264
Parameters
pfn(C++: const func_t *) func_t const *

◆ get_func_bits()

"int" get_func_bits ( * args)
Parameters
pfn(C++: const func_t *) func_t const *

◆ get_func_bytes()

"int" get_func_bytes ( * args)
Parameters
pfn(C++: const func_t *) func_t const *

◆ get_func_chunknum()

"int" get_func_chunknum ( * args)
Return values
-1means 'does not contain ea'
0means the 'pfn' itself contains ea
>0the number of the containing function tail chunk
Parameters
pfn(C++: func_t *)
ea(C++: ea_t)

◆ get_func_cmt()

"qstring *" get_func_cmt ( * args)
Parameters
pfn(C++: const func_t *) ptr to function structure
repeatable(C++: bool) get repeatable comment?
Returns
: size of comment or -1 In fact this function works with function chunks too.

◆ get_func_name()

"qstring *" get_func_name ( * args)
Parameters
ea(C++: ea_t) any address in the function
Returns
: length of the function name

◆ get_func_num()

"int" get_func_num ( * args)
Parameters
ea(C++: ea_t) any address in the function
Returns
: number of function (0..get_func_qty()-1). -1 means 'no function at the specified address'.

◆ get_func_qty()

"size_t" get_func_qty ( * args)

◆ get_func_ranges()

"ea_t" get_func_ranges ( * args)
Parameters
ranges(C++: rangeset_t *) buffer to receive the range info
pfn(C++: func_t *) ptr to function structure
Returns
: end address of the last function range (BADADDR-error)

◆ get_idasgn_desc()

"PyObject *" get_idasgn_desc ( * args)

It returns: (name of signature, names of optional libraries)

See also: get_idasgn_desc_with_matches

Parameters
nnumber of signature in the list (0..get_idasgn_qty()-1)
Returns
: None on failure or tuple(signame, optlibs)

◆ get_idasgn_desc_with_matches()

"PyObject *" get_idasgn_desc_with_matches ( * args)

It returns: (name of signature, names of optional libraries, number of matches)

Parameters
nnumber of signature in the list (0..get_idasgn_qty()-1)
Returns
: None on failure or tuple(signame, optlibs, nmatches)

◆ get_idasgn_qty()

"int" get_idasgn_qty ( * args)
Returns
: 0..n

◆ get_idasgn_title()

"qstring *" get_idasgn_title ( * args)
Parameters
name(C++: const char *) short name of a signature
Returns
: size of signature description or -1

◆ get_next_fchunk()

"func_t *" get_next_fchunk ( * args)
Parameters
ea(C++: ea_t) any address in the program
Returns
: ptr to function chunk or nullptr if next function chunk doesn't exist

◆ get_next_func()

"func_t *" get_next_func ( * args)
Parameters
ea(C++: ea_t) any address in the program
Returns
: ptr to function or nullptr if next function doesn't exist

◆ get_next_func_addr()

"ea_t" get_next_func_addr ( * args)
Parameters
pfnfunc_t *
eaea_t

◆ get_prev_fchunk()

"func_t *" get_prev_fchunk ( * args)
Parameters
ea(C++: ea_t) any address in the program
Returns
: ptr to function chunk or nullptr if previous function chunk doesn't exist

◆ get_prev_func()

"func_t *" get_prev_func ( * args)
Parameters
ea(C++: ea_t) any address in the program
Returns
: ptr to function or nullptr if previous function doesn't exist

◆ get_prev_func_addr()

"ea_t" get_prev_func_addr ( * args)
Parameters
pfnfunc_t *
eaea_t

◆ getn_fchunk()

"func_t *" getn_fchunk ( * args)
Parameters
n(C++: int) number of function chunk, is in range 0..get_fchunk_qty()-1
Returns
: ptr to a function chunk or nullptr. This function may return a function entry as well as a function tail.

◆ getn_func()

"func_t *" getn_func ( * args)
Parameters
n(C++: size_t) number of function, is in range 0..get_func_qty()-1
Returns
: ptr to a function or nullptr. This function returns a function entry chunk.

◆ is_finally_visible_func()

"bool" is_finally_visible_func ( * args)
Parameters
pfn(C++: func_t *)

◆ is_func_entry()

"bool" is_func_entry ( * args)
Parameters
pfn(C++: const func_t *) func_t const *

◆ is_func_locked()

"bool" is_func_locked ( * args)
Parameters
pfn(C++: const func_t *) func_t const *

◆ is_func_tail()

"bool" is_func_tail ( * args)
Parameters
pfn(C++: const func_t *) func_t const *

◆ is_same_func()

"bool" is_same_func ( * args)
Parameters
ea1(C++: ea_t)
ea2(C++: ea_t)

◆ is_visible_func()

"bool" is_visible_func ( * args)
Parameters
pfn(C++: func_t *)

◆ lock_func_range()

"void" lock_func_range ( * args)

Ranges with locked pointers cannot be deleted or moved.

Parameters
pfn(C++: const func_t *) func_t const *
lock(C++: bool)

◆ plan_to_apply_idasgn()

"int" plan_to_apply_idasgn ( * args)
Parameters
fname(C++: const char *) file name. should not contain directory part.
Returns
: 0 if failed, otherwise number of planned (and applied) signatures

◆ read_regargs()

"void" read_regargs ( * args)
Parameters
pfnfunc_t *

◆ reanalyze_function()

"void" reanalyze_function ( * args)

This function plans to analyzes all chunks of the given function. Optional parameters (ea1, ea2) may be used to narrow the analyzed range.

Parameters
pfn(C++: func_t *) pointer to a function
ea1(C++: ea_t) start of the range to analyze
ea2(C++: ea_t) end of range to analyze
analyze_parents(C++: bool) meaningful only if pfn points to a function tail. if true, all tail parents will be reanalyzed. if false, only the given tail will be reanalyzed.

◆ reanalyze_noret_flag()

"bool" reanalyze_noret_flag ( * args)

This function does not remove FUNC_NORET if it is already present. It just plans to reanalysis.

Parameters
ea(C++: ea_t)

◆ remove_func_tail()

"bool" remove_func_tail ( * args)

If the tail belongs only to one function, it will be completely removed. Otherwise if the function was the tail owner, the first function using this tail becomes the owner of the tail.

Parameters
pfn(C++: func_t *) pointer to the function
tail_ea(C++: ea_t) any address inside the tail to remove

◆ set_func_cmt()

"bool" set_func_cmt ( * args)

This function works with function chunks too.

Parameters
pfn(C++: const func_t *) ptr to function structure
cmt(C++: const char *) comment string, may be multiline (with ' '). Use empty str ("") to delete comment
repeatable(C++: bool) set repeatable comment?

◆ set_func_end()

"bool" set_func_end ( * args)
Parameters
ea(C++: ea_t) any address in the function
newend(C++: ea_t) new end address of the function
Returns
: success

◆ set_func_name_if_jumpfunc()

"int" set_func_name_if_jumpfunc ( * args)
Parameters
pfn(C++: func_t *) pointer to function (may be nullptr)
oldname(C++: const char *) old name of function. if old name was in "j_..." form, then we may discard it and set a new name. if oldname is not known, you may pass nullptr.
Returns
: success

◆ set_func_start()

"int" set_func_start ( * args)
Parameters
ea(C++: ea_t) any address in the function
newstart(C++: ea_t) new end address of the function
Returns
: Function move result codes

◆ set_noret_insn()

"bool" set_noret_insn ( * args)

This function can be used by the processor module to tell the kernel about non-returning instructions (like call exit). The kernel will perform the global function analysis and find out if the function returns at all. This analysis will be done at the first call to func_does_return()

Parameters
insn_ea(C++: ea_t)
noret(C++: bool)
Returns
: true if the instruction 'noret' flag has been changed

◆ set_tail_owner()

"bool" set_tail_owner ( * args)

The new owner function must be already referring to the tail (after append_func_tail).

Parameters
fnt(C++: func_t *) pointer to the function tail
new_owner(C++: ea_t) the entry point of the new owner function

◆ set_visible_func()

"void" set_visible_func ( * args)
Parameters
pfn(C++: func_t *)
visible(C++: bool)

◆ try_to_add_libfunc()

"int" try_to_add_libfunc ( * args)

If a library function is found, then create a function and name it accordingly.

Parameters
ea(C++: ea_t) any address in the program
Returns
: Library function codes

◆ update_func()

"bool" update_func ( * args)

You must not change the function start and end addresses using this function. Use set_func_start() and set_func_end() for it.

Parameters
pfn(C++: func_t *) ptr to function structure
Returns
: success

Variable Documentation

◆ FIND_FUNC_DEFINE

FIND_FUNC_DEFINE = _ida_funcs.FIND_FUNC_DEFINE

◆ FIND_FUNC_EXIST

FIND_FUNC_EXIST = _ida_funcs.FIND_FUNC_EXIST

◆ FIND_FUNC_IGNOREFN

FIND_FUNC_IGNOREFN = _ida_funcs.FIND_FUNC_IGNOREFN

◆ FIND_FUNC_KEEPBD

FIND_FUNC_KEEPBD = _ida_funcs.FIND_FUNC_KEEPBD

◆ FIND_FUNC_NORMAL

FIND_FUNC_NORMAL = _ida_funcs.FIND_FUNC_NORMAL

◆ FIND_FUNC_OK

FIND_FUNC_OK = _ida_funcs.FIND_FUNC_OK

◆ FIND_FUNC_UNDEF

FIND_FUNC_UNDEF = _ida_funcs.FIND_FUNC_UNDEF

◆ FUNC_BOTTOMBP

FUNC_BOTTOMBP = _ida_funcs.FUNC_BOTTOMBP

◆ FUNC_FAR

FUNC_FAR = _ida_funcs.FUNC_FAR

◆ FUNC_FRAME

FUNC_FRAME = _ida_funcs.FUNC_FRAME

◆ FUNC_FUZZY_SP

FUNC_FUZZY_SP = _ida_funcs.FUNC_FUZZY_SP

◆ FUNC_HIDDEN

FUNC_HIDDEN = _ida_funcs.FUNC_HIDDEN

◆ FUNC_LIB

FUNC_LIB = _ida_funcs.FUNC_LIB

◆ FUNC_LUMINA

FUNC_LUMINA = _ida_funcs.FUNC_LUMINA

◆ FUNC_NORET

FUNC_NORET = _ida_funcs.FUNC_NORET

◆ FUNC_NORET_PENDING

FUNC_NORET_PENDING = _ida_funcs.FUNC_NORET_PENDING

◆ FUNC_OUTLINE

FUNC_OUTLINE = _ida_funcs.FUNC_OUTLINE

◆ FUNC_PROLOG_OK

FUNC_PROLOG_OK = _ida_funcs.FUNC_PROLOG_OK

◆ FUNC_PURGED_OK

FUNC_PURGED_OK = _ida_funcs.FUNC_PURGED_OK

◆ FUNC_REANALYZE

FUNC_REANALYZE = _ida_funcs.FUNC_REANALYZE

◆ FUNC_SP_READY

FUNC_SP_READY = _ida_funcs.FUNC_SP_READY

◆ FUNC_STATICDEF

FUNC_STATICDEF = _ida_funcs.FUNC_STATICDEF

◆ FUNC_TAIL

FUNC_TAIL = _ida_funcs.FUNC_TAIL

◆ FUNC_THUNK

FUNC_THUNK = _ida_funcs.FUNC_THUNK

◆ FUNC_USERFAR

FUNC_USERFAR = _ida_funcs.FUNC_USERFAR

◆ IDASGN_APPLIED

IDASGN_APPLIED = _ida_funcs.IDASGN_APPLIED

◆ IDASGN_BADARG

IDASGN_BADARG = _ida_funcs.IDASGN_BADARG

◆ IDASGN_CURRENT

IDASGN_CURRENT = _ida_funcs.IDASGN_CURRENT

◆ IDASGN_OK

IDASGN_OK = _ida_funcs.IDASGN_OK

◆ IDASGN_PLANNED

IDASGN_PLANNED = _ida_funcs.IDASGN_PLANNED

◆ LIBFUNC_DELAY

LIBFUNC_DELAY = _ida_funcs.LIBFUNC_DELAY

◆ LIBFUNC_FOUND

LIBFUNC_FOUND = _ida_funcs.LIBFUNC_FOUND

◆ LIBFUNC_NONE

LIBFUNC_NONE = _ida_funcs.LIBFUNC_NONE

◆ MOVE_FUNC_BADSTART

MOVE_FUNC_BADSTART = _ida_funcs.MOVE_FUNC_BADSTART

◆ MOVE_FUNC_NOCODE

MOVE_FUNC_NOCODE = _ida_funcs.MOVE_FUNC_NOCODE

◆ MOVE_FUNC_NOFUNC

MOVE_FUNC_NOFUNC = _ida_funcs.MOVE_FUNC_NOFUNC

◆ MOVE_FUNC_OK

MOVE_FUNC_OK = _ida_funcs.MOVE_FUNC_OK

◆ MOVE_FUNC_REFUSED

MOVE_FUNC_REFUSED = _ida_funcs.MOVE_FUNC_REFUSED