ROSE 0.11.145.192
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::ReadWriteSets Class Reference

Description

Sets of variables based on whether they're read or written.

This class is mostly just a reorganization of the results from a variable detection analysis, and thus has the same caveats as that analysis.

Definition at line 16 of file ReadWriteSets.h.

#include <Rose/BinaryAnalysis/ReadWriteSets.h>

Classes

struct  Settings
 Settings that control this analysis. More...
 

Public Types

using Ptr = ReadWriteSetsPtr
 Shared ownership pointer for ReadWriteSets.
 

Public Member Functions

void analyze (const Partitioner2::FunctionPtr &)
 Analyze a function.
 
std::vector< Variables::StackVariablelocalVariables (Variables::AccessFlags required=Variables::AccessFlags(), Variables::AccessFlags forbidden=Variables::AccessFlags()) const
 Local variables.
 
void print (std::ostream &, const std::string &prefix="") const
 Print results.
 
const Settingssettings () const
 Property: Settings for this analysis.
 
Settingssettings ()
 Property: Settings for this analysis.
 

Static Public Member Functions

static Ptr instance (const Partitioner2::PartitionerConstPtr &, const Settings &=Settings())
 Allocating constructor.
 
static Sawyer::CommandLine::SwitchGroup commandLineSwitches (Settings &)
 Command-line switches for this analysis.
 

Protected Member Functions

 ReadWriteSets (const Partitioner2::PartitionerConstPtr &, const Settings &)
 

Member Typedef Documentation

◆ Ptr

Shared ownership pointer for ReadWriteSets.

Definition at line 19 of file ReadWriteSets.h.

Member Function Documentation

◆ commandLineSwitches()

static Sawyer::CommandLine::SwitchGroup Rose::BinaryAnalysis::ReadWriteSets::commandLineSwitches ( Settings )
static

Command-line switches for this analysis.

The returned command line switch group will capture a reference to the Settings argument so that when the command-line is parsed later those settings will be adjusted. The returned switch group does not affect the variableFinder switches in the settings–you should call Variables::VariableFinder::commandLineSwitches if you want to do that.

◆ analyze()

void Rose::BinaryAnalysis::ReadWriteSets::analyze ( const Partitioner2::FunctionPtr )

Analyze a function.

The function is analyzed (or re-analyzed if it was previously analyzed) and the results are saved in this object.

◆ localVariables()

std::vector< Variables::StackVariable > Rose::BinaryAnalysis::ReadWriteSets::localVariables ( Variables::AccessFlags  required = Variables::AccessFlags(),
Variables::AccessFlags  forbidden = Variables::AccessFlags() 
) const

Local variables.

Returns information about the local variables. The returned variables must have all the specified required flags and none of the specified forbidden flags.

Example: To get information about all local variables that are both read and written, so something like this:

ReadWriteSets::Ptr rwsets = ...;
rwsets->localVariables(Variable::AccessFlags().set(Variable::Access::READ).set(Variable::Access::WRITE));
ReadWriteSetsPtr Ptr
Shared ownership pointer for ReadWriteSets.

If called with the default argument, then returns information about all known local variables.

◆ print()

void Rose::BinaryAnalysis::ReadWriteSets::print ( std::ostream &  ,
const std::string &  prefix = "" 
) const

Print results.

The multi-line output is sent to the specified stream and each line of output is prefixed by the specified string.


The documentation for this class was generated from the following file: