Otawa  0.10
otawa::LabelAddress Class Reference

A label address formed by a label and a possible signed offset. More...

#include <otawa/util/SymAddress.h>

Inheritance diagram for otawa::LabelAddress:
otawa::SymAddress

Public Member Functions

 LabelAddress (string label, t::int32 offset=0)
 
virtual Address toAddress (WorkSpace *ws)
 Expand the current symbolic address as an actual address in the given workspace. More...
 
virtual CFGcfg (WorkSpace *ws)
 Get the CFG matching the given address. More...
 
virtual void print (io::Output &out)
 Print the symbolic address. More...
 

Static Public Member Functions

static SymAddressparse (string str) throw (otawa::Exception)
 Parse a symbolic address from a string. More...
 

Private Attributes

string _label
 
t::int32 _offset
 

Detailed Description

A label address formed by a label and a possible signed offset.

Constructor & Destructor Documentation

otawa::LabelAddress::LabelAddress ( string  label,
t::int32  offset = 0 
)

Member Function Documentation

CFG * otawa::LabelAddress::cfg ( WorkSpace ws)
virtual

Get the CFG matching the given address.

CFG_INFO_FEATURE should be available first.

Parameters
wsWorkspace to look in.
Returns
Found CFG or null.

Implements otawa::SymAddress.

References otawa::CFG_INFO_FEATURE, otawa::WorkSpace::findInstAt(), otawa::CFGInfo::ID, otawa::WorkSpace::isProvided(), and toAddress().

SymAddress * otawa::SymAddress::parse ( string  str)
throw (otawa::Exception
)
staticinherited

Parse a symbolic address from a string.

Parameters
strString to parse.
Returns
Built symbolic address (deletion is delegated to the caller).
Exceptions
otawa::ExceptionThrown if there is a parsing error.

References elm::MessageException::message(), and otawa::sem::neg().

Referenced by otawa::Application::parseAddress().

void otawa::LabelAddress::print ( io::Output out)
virtual

Print the symbolic address.

Parameters
outStream to output to.

Implements otawa::SymAddress.

References _label, _offset, and hex().

Address otawa::LabelAddress::toAddress ( WorkSpace ws)
virtual

Expand the current symbolic address as an actual address in the given workspace.

Parameters
wsWorkspace to expand in.
Returns
Actual address.

Implements otawa::SymAddress.

References _label, _offset, otawa::Symbol::address(), otawa::Process::findSymbol(), otawa::Address::null, and otawa::WorkSpace::process().

Referenced by cfg().

Member Data Documentation

string otawa::LabelAddress::_label
private

Referenced by print(), and toAddress().

t::int32 otawa::LabelAddress::_offset
private

Referenced by print(), and toAddress().


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