OTAWA
2.0
Framework to perform machine analysis and compute WCET.
|
#include <otawa/prog/File.h>
Classes | |
class | SegIter |
class | SymIter |
Public Member Functions | |
void | addSegment (Segment *seg) |
void | addSymbol (Symbol *sym) |
File (String name) | |
Inst * | findInstAt (address_t address) |
Inst *File::findByAddress(address_t address); Find an instruction by its address. More... | |
ProgItem * | findItemAt (address_t address) |
Find a program item by its address. More... | |
address_t | findLabel (const String &label) |
Find the address of the given label. More... | |
Segment * | findSegmentAt (Address addr) |
Find the segment at the given address. More... | |
Symbol * | findSymbol (String name) |
Find a symbol by its name. More... | |
CString | name (void) |
void | removeSymbol (Symbol *sym) |
const Vector< Segment * > & | segments (void) const |
const syms_t & | symbols (void) const |
Public Member Functions inherited from otawa::PropList | |
void | addProp (Property *prop) |
Add property to the list without checking of duplication. More... | |
void | addProps (const PropList &props) |
Add all properties from the given property list, in a reverse order. More... | |
GetterRange | all (const AbstractIdentifier &id) const |
void | clearProps (void) |
Remove all properties from the list. More... | |
Property * | extractProp (const AbstractIdentifier &id) |
Property * | extractProp (const AbstractIdentifier *id) |
Remove a property matching the given identifier and return it. More... | |
Property * | getProp (const AbstractIdentifier *id) const |
Find a property by its identifier. More... | |
bool | hasProp (const AbstractIdentifier &id) const |
PropList & | operator= (const PropList &props) |
void | print (elm::io::Output &out) const |
Display the current property list. More... | |
PropRange | properties (void) const |
PropList (const PropList &props) | |
Initialize a property list from a sequence of (identifier, value) pairs passed as variable arguments. More... | |
PropList (void) | |
void | removeAllProp (const AbstractIdentifier *id) |
Remove all the properties matching the given identifier. More... | |
void | removeProp (const AbstractIdentifier &id) |
void | removeProp (const AbstractIdentifier *id) |
Remove a property matching the given identifier. More... | |
void | setProp (const AbstractIdentifier *id) |
void | setProp (Property *prop) |
Set the property in the property list removing any double. More... | |
void | takeProps (PropList &props) |
Take properties from props to the current property list. More... | |
~PropList (void) | |
Static Public Attributes | |
static rtti::Type & | __type = file_class |
Static Public Attributes inherited from otawa::PropList | |
static rtti::Type & | __type = prop_list_class |
static const PropList | EMPTY |
This is an empty proplist for convenience. More... | |
Protected Member Functions | |
~File (void) | |
Private Types | |
typedef HashMap< String, Symbol * > | syms_t |
Private Attributes | |
String | _name |
Vector< Segment * > | segs |
syms_t | syms |
Friends | |
class | Process |
This class represents a file involved in the building of a process. A file usually matches a program file on the system file system.
|
private |
|
inline |
Build a file with the given name.
name | Name of the file. |
|
protected |
Add the given symbol to the file.
sym | Added symbol. |
References otawa::Symbol::name(), elm::HashMap< class, class, class, class, class >::put(), and syms.
Inst *File::findByAddress(address_t address); Find an instruction by its address.
address | Instruction address. |
Find an instruction by its address.
address | Instruction address. |
Referenced by otawa::Symbol::findInst(), and otawa::Symbol::setNoReturn().
Find a program item by its address.
address | Program item address. |
Find the address of the given label.
label | Label to find. |
References otawa::Symbol::address(), elm::HashMap< class, class, class, class, class >::get(), otawa::Address::null, and syms.
Referenced by otawa::CFGCollector::setup().
Find the segment at the given address.
addr | Looked address. |
Find a symbol by its name.
name | Symbol name. |
References elm::HashMap< class, class, class, class, class >::get(), name(), and syms.
Get the name of the file. It is usually its absolute path.
References _name, and elm::String::toCString().
Referenced by findSymbol(), otawa::ProcessException::message(), otawa::operator<<(), otawa::display::ILPSystemDisplayer::processWorkSpace(), otawa::display::CFGOutput::setup(), and otawa::script::Script::work().
|
static |
Referenced by addSegment(), and segments().
|
private |
Referenced by addSymbol(), findLabel(), findSymbol(), removeSymbol(), and symbols().