ROSE 0.11.145.192
|
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::StackVariable > | localVariables (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 Settings & | settings () const |
Property: Settings for this analysis. | |
Settings & | settings () |
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 &) | |
Shared ownership pointer for ReadWriteSets.
Definition at line 19 of file ReadWriteSets.h.
|
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.
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.
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:
If called with the default argument, then returns information about all known local variables.
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.