Otawa  0.10
otawa::SymAddress Class Referenceabstract

Abstraction of a program address that may be expressed using several ways: absolute address, label + offset, source file:line, etc. More...

#include <otawa/util/SymAddress.h>

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

Public Member Functions

virtual ~SymAddress (void)
 
virtual Address toAddress (WorkSpace *ws)=0
 Expand the current symbolic address as an actual address in the given workspace. More...
 
virtual CFGcfg (WorkSpace *ws)=0
 Get the CFG matching the given address. More...
 
virtual void print (io::Output &out)=0
 Print the symbolic address. More...
 

Static Public Member Functions

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

Detailed Description

Abstraction of a program address that may be expressed using several ways: absolute address, label + offset, source file:line, etc.

This type of address is handled either by user, or by external application that generates human-readable output.

Constructor & Destructor Documentation

otawa::SymAddress::~SymAddress ( void  )
virtual

Member Function Documentation

CFG * otawa::SymAddress::cfg ( WorkSpace ws)
pure 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.

Implemented in otawa::LabelAddress, and otawa::AbsoluteAddress.

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

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::SymAddress::print ( io::Output out)
pure virtual

Print the symbolic address.

Parameters
outStream to output to.

Implemented in otawa::LabelAddress, and otawa::AbsoluteAddress.

Referenced by otawa::operator<<().

Address otawa::SymAddress::toAddress ( WorkSpace ws)
pure virtual

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

Parameters
wsWorkspace to expand in.
Returns
Actual address.

Implemented in otawa::LabelAddress, and otawa::AbsoluteAddress.

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


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