ROSE 0.11.145.147
Public Member Functions | List of all members
Rose::BinaryAnalysis::Variables::GlobalVariable Class Reference

Description

Description of a global variable.

Definition at line 302 of file Variables.h.

#include <Rose/BinaryAnalysis/Variables.h>

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

Public Member Functions

 GlobalVariable ()
 Default constructor.
 
 GlobalVariable (rose_addr_t startingAddress, rose_addr_t maxSizeBytes, const AddressSet &definingInstructionVas=AddressSet(), const std::string &name="")
 Constructor.
 
const std::string & setDefaultName ()
 Give variable a defult name.
 
AddressInterval interval () const
 Location of variable in memory.
 
 operator bool () const
 Predicate to test whether variable is valid.
 
bool operator! () const
 Predicate to test whether variable is invalid.
 
rose_addr_t address () const
 Property: Starting address.
 
void address (rose_addr_t va)
 Property: Starting address.
 
bool operator== (const GlobalVariable &other) const
 Compare two global variable descriptors.
 
bool operator!= (const GlobalVariable &other) const
 Compare two global variable descriptors.
 
void print (std::ostream &) const
 Printing global variable.
 
std::string toString () const
 Printing global variable.
 
- Public Member Functions inherited from Rose::BinaryAnalysis::Variables::BaseVariable
 BaseVariable (const BaseVariable &)
 
rose_addr_t maxSizeBytes () const
 Property: Maximum variable size in bytes.
 
void maxSizeBytes (rose_addr_t size)
 Property: Maximum variable size in bytes.
 
const AddressSetdefiningInstructionVas () const
 Property: Addresses of instructions related to this variable.
 
AddressSetdefiningInstructionVas ()
 Property: Addresses of instructions related to this variable.
 
void definingInstructionVas (const AddressSet &vas)
 Property: Addresses of instructions related to this variable.
 
const InstructionSemantics::BaseSemantics::InputOutputPropertySetioProperties () const
 Property: I/O properties.
 
InstructionSemantics::BaseSemantics::InputOutputPropertySetioProperties ()
 Property: I/O properties.
 
void ioProperties (const InstructionSemantics::BaseSemantics::InputOutputPropertySet &set)
 Property: I/O properties.
 
const std::string & name () const
 Property: Optional variable name.
 
void name (const std::string &s)
 Property: Optional variable name.
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ GlobalVariable() [1/2]

Rose::BinaryAnalysis::Variables::GlobalVariable::GlobalVariable ( )

Default constructor.

Constructs a descriptor for an invalid global variable whose maximum size is zero.

◆ GlobalVariable() [2/2]

Rose::BinaryAnalysis::Variables::GlobalVariable::GlobalVariable ( rose_addr_t  startingAddress,
rose_addr_t  maxSizeBytes,
const AddressSet definingInstructionVas = AddressSet(),
const std::string &  name = "" 
)

Constructor.

Creates a global variable descriptor for a variable whose lowest address is startingAddress and whose maximum size is maxSizeBytes bytes. The optional definingInstructionVas are the addresses of the instructions from which this variable was discerned and are usually memory dereferencing instructions.

Member Function Documentation

◆ address() [1/2]

rose_addr_t Rose::BinaryAnalysis::Variables::GlobalVariable::address ( ) const

Property: Starting address.

This property is the lowest address for the variable.

◆ address() [2/2]

void Rose::BinaryAnalysis::Variables::GlobalVariable::address ( rose_addr_t  va)

Property: Starting address.

This property is the lowest address for the variable.

◆ setDefaultName()

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

Give variable a defult name.

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

◆ operator==()

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

Compare two global variable descriptors.

Two global variable descriptors are equal if and only if they have the same starting address and maximum size.

◆ operator!=()

Compare two global variable descriptors.

Two global variable descriptors are equal if and only if they have the same starting address and maximum size.

◆ operator bool()

Rose::BinaryAnalysis::Variables::GlobalVariable::operator bool ( ) const
inlineexplicit

Predicate to test whether variable is valid.

Returns true if the variable is valid, i.e., if it has a non-zero size. Default constructed variables have a zero size.

Definition at line 369 of file Variables.h.

References interval(), and Sawyer::Container::Interval< T >::isEmpty().

◆ operator!()

bool Rose::BinaryAnalysis::Variables::GlobalVariable::operator! ( ) const
inline

Predicate to test whether variable is invalid.

Returns true if the variable is invalid, i.e., if it has a zero size.

Definition at line 376 of file Variables.h.

References interval(), and Sawyer::Container::Interval< T >::isEmpty().


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