ROSE  0.11.21.0
Classes | Typedefs | Functions | Variables
Rose::BinaryAnalysis::Variables Namespace Reference

Description

Facilities for detecting variables in binaries.

Classes

class  BaseVariable
 Describes a local or global variable. More...
 
class  GlobalVariable
 Description of a global variable. More...
 
class  StackVariable
 Description of a local stack variable within a function. More...
 
class  VariableFinder
 Analysis to find variable locations. More...
 

Typedefs

typedef Sawyer::Container::Set< rose_addr_t > AddressSet
 Set of addresses. More...
 
typedef std::map< int64_t, AddressSetOffsetToAddresses
 Mapping from stack offsets to address sets. More...
 
typedef std::map< rose_addr_t, AddressSetAddressToAddresses
 Mapping from addresses to address sets. More...
 
typedef Sawyer::Container::Interval< int64_t > OffsetInterval
 Interval of signed offsets. More...
 
typedef Sawyer::Container::IntervalMap< OffsetInterval, StackVariableStackVariables
 Collection of local variables. More...
 
typedef Sawyer::Container::IntervalMap< AddressInterval, GlobalVariableGlobalVariables
 Maps virtual addresses to global variables. More...
 

Functions

void initDiagnostics ()
 Initialize diagnostic output. More...
 
std::string offsetStr (int64_t offset)
 Format a stack offset as a string. More...
 
std::string sizeStr (uint64_t size)
 Format size as a string. More...
 
void print (const StackVariables &, const Partitioner2::Partitioner &, std::ostream &out, const std::string &prefix="")
 Print info about multiple local variables. More...
 
void print (const GlobalVariables &, const Partitioner2::Partitioner &, std::ostream &out, const std::string &prefix="")
 Print info about multiple global variables. More...
 

Variables

Sawyer::Message::Facility mlog
 Diagnostic facility. More...
 

Typedef Documentation

Set of addresses.

Definition at line 27 of file BinaryVariables.h.

Mapping from stack offsets to address sets.

Definition at line 30 of file BinaryVariables.h.

Mapping from addresses to address sets.

Definition at line 33 of file BinaryVariables.h.

Interval of signed offsets.

Definition at line 36 of file BinaryVariables.h.

Collection of local variables.

Definition at line 222 of file BinaryVariables.h.

Maps virtual addresses to global variables.

The global variable will be represented in the map at all addresses that the global variable could occupy. E.g., if global variable "g1" starts at 0x4000 and can be up to 1k 4-byte integers, then a record will exist in the map at all addresses from 0x4000 (inclusive) to 0x4100 (exclusive).

Definition at line 305 of file BinaryVariables.h.

Function Documentation

void Rose::BinaryAnalysis::Variables::initDiagnostics ( )

Initialize diagnostic output.

This is called automatically when ROSE is initialized.

std::string Rose::BinaryAnalysis::Variables::offsetStr ( int64_t  offset)

Format a stack offset as a string.

std::string Rose::BinaryAnalysis::Variables::sizeStr ( uint64_t  size)

Format size as a string.

void Rose::BinaryAnalysis::Variables::print ( const StackVariables ,
const Partitioner2::Partitioner ,
std::ostream &  out,
const std::string &  prefix = "" 
)

Print info about multiple local variables.

This output includes such things as the function to which they belong and the defining instructions. The output is multi-line, intended for debugging.

void Rose::BinaryAnalysis::Variables::print ( const GlobalVariables ,
const Partitioner2::Partitioner ,
std::ostream &  out,
const std::string &  prefix = "" 
)

Print info about multiple global variables.

This output includes such things as their addresses, sizes, and the defining instructions. The output is multi-line, intended for debugging.

Variable Documentation

Sawyer::Message::Facility Rose::BinaryAnalysis::Variables::mlog

Diagnostic facility.