ROSE  0.11.52.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...
 
using StackVariables = Sawyer::Container::IntervalMap< OffsetInterval, StackVariable >
 Collection of local variables organized by frame offsets. More...
 
typedef Sawyer::Container::IntervalMap< AddressInterval, GlobalVariableGlobalVariables
 Maps virtual addresses to global variables. More...
 
using VariableFinderPtr = Sawyer::SharedPointer< class VariableFinder >
 Shared ownership pointer for VariableFinder. 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 30 of file Variables.h.

Mapping from stack offsets to address sets.

Definition at line 33 of file Variables.h.

Mapping from addresses to address sets.

Definition at line 36 of file Variables.h.

Interval of signed offsets.

Definition at line 39 of file Variables.h.

Collection of local variables organized by frame offsets.

Definition at line 225 of file Variables.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 308 of file Variables.h.

Shared ownership pointer for VariableFinder.

Definition at line 321 of file Variables.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.