ROSE
0.9.6a
|
Callback to find thunk tables. More...
#include <Partitioner.h>
Public Member Functions | |
FindThunkTables () | |
virtual bool | operator() (bool enabled, const Args &args) |
The actual callback function. More... | |
Public Member Functions inherited from Partitioner::ByteRangeCallback | |
virtual | ~ByteRangeCallback () |
Public Attributes | |
bool | begins_contiguously |
Match table only at the beginning of the address range. More... | |
bool | ends_contiguously |
Match table only at the end of the address range. More... | |
size_t | minimum_nthunks |
Mininum number of JMPs necessary to be considered a thunk table. More... | |
bool | validate_targets |
If true, then successors must point to instructions. More... | |
size_t | nfound |
Number of thunks (not tables) found by this callback. More... | |
Callback to find thunk tables.
Creates functions whose only instruction is a JMP. The detection is only triggered when a user-specified consecutive number of JMP instructions are encountered. The definition of a thunk in this case is a JMP to an address that has an instruction, provided the JMP does not already appear in a basic block containing more than just the JMP instruction. If the validate_targets property is false, then the callback does not verify that the JMP successors are addresses where an instruction can be disassembled.
See also, FindThunks class.
Definition at line 1360 of file Partitioner.h.
|
inline |
Definition at line 1367 of file Partitioner.h.
|
virtual |
The actual callback function.
This needs to be defined in subclasses.
Implements Partitioner::ByteRangeCallback.
Definition at line 2309 of file Partitioner.C.
References Partitioner::add_function(), Partitioner::append(), SgAsmBlock::BLK_ENTRY_POINT, Partitioner::debug, Range< T >::empty(), Partitioner::Function::entry_va, Partitioner::find_bb_containing(), Partitioner::find_bb_starting(), Partitioner::find_instruction(), Range< T >::first(), SgAsmFunction::FUNC_THUNK, Partitioner::Instruction::get_address(), SgAsmx86Instruction::get_kind(), Partitioner::Instruction::get_size(), Partitioner::BasicBlock::insns, isSgAsmx86Instruction(), Range< T >::last(), Partitioner::ByteRangeCallback::Args::partitioner, Partitioner::ByteRangeCallback::Args::range, Partitioner::successors(), x86_farjmp, and x86_jmp.
bool Partitioner::FindThunkTables::begins_contiguously |
Match table only at the beginning of the address range.
Definition at line 1361 of file Partitioner.h.
bool Partitioner::FindThunkTables::ends_contiguously |
Match table only at the end of the address range.
Definition at line 1362 of file Partitioner.h.
size_t Partitioner::FindThunkTables::minimum_nthunks |
Mininum number of JMPs necessary to be considered a thunk table.
Definition at line 1363 of file Partitioner.h.
Referenced by Partitioner::post_cfg().
bool Partitioner::FindThunkTables::validate_targets |
If true, then successors must point to instructions.
Definition at line 1364 of file Partitioner.h.
Referenced by Partitioner::post_cfg().
size_t Partitioner::FindThunkTables::nfound |
Number of thunks (not tables) found by this callback.
Definition at line 1365 of file Partitioner.h.