ROSE
0.9.6a
|
Callback to find thunks. More...
#include <Partitioner.h>
Public Member Functions | |
FindThunks () | |
virtual bool | operator() (bool enabled, const Args &args) |
The actual callback function. More... | |
Public Member Functions inherited from Partitioner::InsnRangeCallback | |
virtual | ~InsnRangeCallback () |
Public Attributes | |
size_t | validate_targets |
If true, then the successor must point to the entry point of an existing function. More... | |
size_t | nfound |
Incremented for each thunk found and added. More... | |
Callback to find thunks.
Creates functions whose only instruction is a JMP to the entry point of another function. This should be called by scan_unassigned_insns() before the PostFunctionBlocks callback. Since this is an instruction callback, it only scans existing instructions.
A thunk by this definition is a JMP instruction that is not already in the middle of a basic block and which has a single successor that's the entry point of an existing function.
See also, FindThunkTables class.
Definition at line 1345 of file Partitioner.h.
|
inline |
Definition at line 1349 of file Partitioner.h.
|
virtual |
The actual callback function.
This needs to be defined in subclasses.
Implements Partitioner::InsnRangeCallback.
Definition at line 2217 of file Partitioner.C.
References Partitioner::add_function(), Partitioner::BasicBlock::address(), Partitioner::append(), SgAsmBlock::BLK_ENTRY_POINT, Partitioner::debug, Partitioner::find_bb_containing(), Partitioner::find_bb_starting(), Partitioner::find_instruction(), SgAsmFunction::FUNC_PADDING, SgAsmFunction::FUNC_THUNK, Partitioner::functions, Partitioner::Instruction::get_address(), SgAsmx86Instruction::get_kind(), Partitioner::Instruction::get_size(), Partitioner::Instruction::get_successors(), Partitioner::InsnRangeCallback::Args::insn_begin, Partitioner::BasicBlock::insns, isSgAsmx86Instruction(), Partitioner::InsnRangeCallback::Args::ninsns, Partitioner::InsnRangeCallback::Args::partitioner, x86_farjmp, and x86_jmp.
size_t Partitioner::FindThunks::validate_targets |
If true, then the successor must point to the entry point of an existing function.
Definition at line 1346 of file Partitioner.h.
size_t Partitioner::FindThunks::nfound |
Incremented for each thunk found and added.
Definition at line 1347 of file Partitioner.h.
Referenced by Partitioner::post_cfg().