ROSE  0.11.51.0
Public Member Functions | Friends | List of all members
Rose::BinaryAnalysis::Variables::StackVariable Class Reference

Description

Description of a local stack variable within a function.

Definition at line 147 of file Variables.h.

#include <Variables.h>

Inheritance diagram for Rose::BinaryAnalysis::Variables::StackVariable:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Variables::StackVariable:
Collaboration graph
[legend]

Public Member Functions

 StackVariable ()
 Default constructor. More...
 
 StackVariable (const Partitioner2::FunctionPtr &, int64_t frameOffset, rose_addr_t maxSizeBytes, const AddressSet &definingInstructionVas=AddressSet(), const std::string &name="")
 Construct a variable descriptor. More...
 
const std::string & setDefaultName ()
 Give variable a defult name. More...
 
OffsetInterval interval () const
 Location within the function stack frame. More...
 
Partitioner2::FunctionPtr function () const
 Property: Function owning the variable. More...
 
void function (const Partitioner2::FunctionPtr &)
 Property: Function owning the variable. More...
 
int64_t frameOffset () const
 Property: Frame offset. More...
 
void frameOffset (int64_t offset)
 Property: Frame offset. More...
 
bool operator== (const StackVariable &other) const
 Compare two local variables. More...
 
bool operator!= (const StackVariable &other) const
 Compare two local variables. More...
 
void print (std::ostream &) const
 Printing local variable.
 
std::string toString () const
 Printing local variable.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::Variables::BaseVariable
rose_addr_t maxSizeBytes () const
 Property: Maximum variable size in bytes. More...
 
void maxSizeBytes (rose_addr_t size)
 Property: Maximum variable size in bytes. More...
 
const AddressSetdefiningInstructionVas () const
 Property: Addresses of instructions related to this variable. More...
 
AddressSetdefiningInstructionVas ()
 Property: Addresses of instructions related to this variable. More...
 
void definingInstructionVas (const AddressSet &vas)
 Property: Addresses of instructions related to this variable. More...
 
const InstructionSemantics2::BaseSemantics::InputOutputPropertySetioProperties () const
 Property: I/O properties. More...
 
InstructionSemantics2::BaseSemantics::InputOutputPropertySetioProperties ()
 Property: I/O properties. More...
 
void ioProperties (const InstructionSemantics2::BaseSemantics::InputOutputPropertySet &set)
 Property: I/O properties. More...
 
const std::string & name () const
 Property: Optional variable name. More...
 
void name (const std::string &s)
 Property: Optional variable name. More...
 

Friends

std::ostream & operator<< (std::ostream &, const Rose::BinaryAnalysis::Variables::StackVariable &)
 Print local variable descriptor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Rose::BinaryAnalysis::Variables::BaseVariable
 BaseVariable ()
 Default constructor. More...
 
 BaseVariable (size_t maxSizeBytes, const AddressSet &definingInstructionVas, const std::string &name)
 Construct a variable with a given maximum size. More...
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::Variables::StackVariable::StackVariable ( )

Default constructor.

Creates an invalid (zero-sized) variable descriptor.

Rose::BinaryAnalysis::Variables::StackVariable::StackVariable ( const Partitioner2::FunctionPtr ,
int64_t  frameOffset,
rose_addr_t  maxSizeBytes,
const AddressSet definingInstructionVas = AddressSet(),
const std::string &  name = "" 
)

Construct a variable descriptor.

Member Function Documentation

Partitioner2::FunctionPtr Rose::BinaryAnalysis::Variables::StackVariable::function ( ) const

Property: Function owning the variable.

A default constructed object will have a null function pointer. All other objects have a valid function pointer.

void Rose::BinaryAnalysis::Variables::StackVariable::function ( const Partitioner2::FunctionPtr )

Property: Function owning the variable.

A default constructed object will have a null function pointer. All other objects have a valid function pointer.

int64_t Rose::BinaryAnalysis::Variables::StackVariable::frameOffset ( ) const
inline

Property: Frame offset.

This is the address of the variable relative to the function's start-of-frame. For multi-byte variables, this is the lowest address of the variable. Depending on the architecture, the start-of-frame could be higher or lower than the variable, thus the return value is signed.

Definition at line 191 of file Variables.h.

void Rose::BinaryAnalysis::Variables::StackVariable::frameOffset ( int64_t  offset)
inline

Property: Frame offset.

This is the address of the variable relative to the function's start-of-frame. For multi-byte variables, this is the lowest address of the variable. Depending on the architecture, the start-of-frame could be higher or lower than the variable, thus the return value is signed.

Definition at line 192 of file Variables.h.

const std::string& Rose::BinaryAnalysis::Variables::StackVariable::setDefaultName ( )

Give variable a defult name.

This variable's name is replaced by a generated name and the name is returned.

bool Rose::BinaryAnalysis::Variables::StackVariable::operator== ( const StackVariable other) const

Compare two local variables.

Local variables are equal if and only if they belong to the same function, have the same frame offset, and have the same maximum size or both are default constructed.

bool Rose::BinaryAnalysis::Variables::StackVariable::operator!= ( const StackVariable other) const

Compare two local variables.

Local variables are equal if and only if they belong to the same function, have the same frame offset, and have the same maximum size or both are default constructed.

OffsetInterval Rose::BinaryAnalysis::Variables::StackVariable::interval ( ) const

Location within the function stack frame.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const Rose::BinaryAnalysis::Variables::StackVariable  
)
friend

Print local variable descriptor.


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