ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Partitioner::FindDataPadding Struct Reference

Callback to detect padding. More...

#include <Partitioner.h>

Inheritance diagram for Partitioner::FindDataPadding:
Collaboration diagram for Partitioner::FindDataPadding:

Public Member Functions

 FindDataPadding ()
 
virtual bool operator() (bool enabled, const Args &args)
 The actual callback function. More...
 
- Public Member Functions inherited from Partitioner::ByteRangeCallback
virtual ~ByteRangeCallback ()
 

Public Attributes

std::vector< SgUnsignedCharListpatterns
 Pattern of padding, repeated at least minimum_size times. More...
 
size_t minimum_nrep
 Minimum number of matched patterns to be considered padding. More...
 
size_t maximum_nrep
 Maximum number of mathced patterns to be considered padding. More...
 
bool begins_contiguously
 If true, pattern must start immediately after a function. More...
 
bool ends_contiguously
 If true, pattern must end immediately before a function. More...
 
rose_addr_t maximum_range_size
 Skip this callback if the range is larger than this. More...
 
size_t nfound
 Total number of blocks found by this callback. More...
 

Detailed Description

Callback to detect padding.

This callback looks for repeated patterns of bytes that are used for padding and adds them as a static data block to the preceding function. Multiple patterns can be specified per callback object for efficiency, and the first pattern that matches will be used. Each pattern is matched as many times as possible (up to a user-specified maximum). Once a repeated matching of the pattern is found, it is considered padding only if it matches at least some minimum (user-specified) number of times and is anchored to (contiguous with) a preceding and/or following function according to the begins_contiguously and ends_contiguously properties.

This callback can be invoked by scan_unassigned_bytes(), scan_intrafunc_bytes(), or scan_interfunc_bytes() depending on the kind of padding for which it is searching.

Definition at line 1209 of file Partitioner.h.

Constructor & Destructor Documentation

Partitioner::FindDataPadding::FindDataPadding ( )
inline

Definition at line 1218 of file Partitioner.h.

Member Function Documentation

Member Data Documentation

std::vector<SgUnsignedCharList> Partitioner::FindDataPadding::patterns

Pattern of padding, repeated at least minimum_size times.

Definition at line 1210 of file Partitioner.h.

Referenced by Partitioner::post_cfg().

size_t Partitioner::FindDataPadding::minimum_nrep

Minimum number of matched patterns to be considered padding.

Definition at line 1211 of file Partitioner.h.

Referenced by Partitioner::post_cfg().

size_t Partitioner::FindDataPadding::maximum_nrep

Maximum number of mathced patterns to be considered padding.

Definition at line 1212 of file Partitioner.h.

Referenced by Partitioner::post_cfg().

bool Partitioner::FindDataPadding::begins_contiguously

If true, pattern must start immediately after a function.

Definition at line 1213 of file Partitioner.h.

Referenced by Partitioner::post_cfg().

bool Partitioner::FindDataPadding::ends_contiguously

If true, pattern must end immediately before a function.

Definition at line 1214 of file Partitioner.h.

Referenced by Partitioner::post_cfg().

rose_addr_t Partitioner::FindDataPadding::maximum_range_size

Skip this callback if the range is larger than this.

Definition at line 1215 of file Partitioner.h.

size_t Partitioner::FindDataPadding::nfound

Total number of blocks found by this callback.

Definition at line 1216 of file Partitioner.h.


The documentation for this struct was generated from the following files: