Provides access to function-related operations within the database.
More...
#include <function.hpp>
Provides access to function-related operations within the database.
◆ Functions()
Functions::Functions |
( |
const Database & |
database | ) |
|
|
inline |
Constructs a functions handler for the given database.
- Parameters
-
database | Reference to the active IDA database. |
◆ create()
bool Functions::create |
( |
const ea_t |
ea | ) |
const |
Creates a new function at the specified address.
- Parameters
-
ea | The effective address to start the function. |
- Returns
- True if the function was successfully created, false otherwise.
◆ get_all()
Retrieves all functions in the database.
- Returns
- A functions iterator covering the entire database range.
◆ get_at()
func_t* Functions::get_at |
( |
const ea_t |
ea | ) |
const |
Retrieves the function associated with the given address.
- Parameters
-
ea | An effective address within the function body. |
- Returns
- A pointer to the corresponding function (
func_t*
), or nullptr
on failure.
◆ get_basic_blocks()
Retrieves the basic blocks that compose the given function.
- Parameters
-
func | The function instance. |
- Returns
- An iterator for the function's basic blocks.
◆ get_between()
Iterator Functions::get_between |
( |
const ea_t |
start, |
|
|
const ea_t |
end |
|
) |
| const |
|
inline |
Retrieves functions between specified addresses.
- Parameters
-
start | Start address of the range. |
end | End address of the range. |
- Returns
- A functions iterator.
◆ get_disassembly()
std::vector<std::string> Functions::get_disassembly |
( |
const func_t * |
func | ) |
const |
Retrieves the disassembly lines for the given function.
- Parameters
-
func | The function instance. |
- Returns
- A vector of strings, each representing a line of disassembly.
◆ get_instructions()
Retrieves all instructions within the given function.
- Parameters
-
func | The function instance. |
- Returns
- An instruction iterator for the function.
◆ get_name()
std::string Functions::get_name |
( |
const func_t * |
func | ) |
const |
Retrieves the name of the given function.
- Parameters
-
func | The function instance. |
- Returns
- The function's name as a string, or an empty string on failure.
◆ get_pseudocode()
std::vector<std::string> Functions::get_pseudocode |
( |
const func_t * |
func, |
|
|
bool |
remove_tags = true |
|
) |
| const |
Retrieves the decompiled pseudocode of the given function.
- Parameters
-
func | The function instance. |
remove_tags | Remove the tags, return a cleaned line. |
- Returns
- A vector of strings, each representing a line of pseudocode.
◆ get_signature()
std::string Functions::get_signature |
( |
const func_t * |
func | ) |
const |
Retrieves the function's type signature.
- Parameters
-
func | The function instance. |
- Returns
- The signature as a string, or an empty string if unavailable.
◆ matches_signature()
bool Functions::matches_signature |
( |
const func_t * |
func, |
|
|
const std::string & |
signature |
|
) |
| const |
Checks if a function matches the given signature.
- Parameters
-
func | The function instance. |
signature | The signature string to compare. |
- Returns
- True if the function matches, false otherwise.
◆ remove()
bool Functions::remove |
( |
const ea_t |
ea | ) |
const |
Deletes the function at the specified address.
- Parameters
-
ea | The effective address of the function to remove. |
- Returns
- True if the function was successfully removed, false otherwise.
◆ set_name()
bool Functions::set_name |
( |
const func_t * |
func, |
|
|
const std::string & |
name |
|
) |
| const |
Renames the given function.
- Parameters
-
func | The function instance. |
name | The new name to assign to the function. |
- Returns
- True on success, false otherwise.
The documentation for this class was generated from the following file:
- /home/runner/work/ida-api-domain/ida-api-domain/include/entities/function.hpp