Otawa  0.10
otawa::gliss::Info Class Referenceabstract

This class provides access to the stay-behind GLISS data structures and code provided by the GLISS v2 utility used by some loaders. More...

#include <otawa/loader/gliss.h>

Public Member Functions

virtual bool check (t::uint32 checksum)=0
 As the validity of the data used in Gliss is strongly coupled with the data of an analysis using this object, OTAWA provides a way to generate a checksum of the file isa/id.h and to compare both values stored in the loader and in the analysis with this function. More...
 
virtual void * decode (Inst *inst)=0
 Decode an instruction and return its descriptor. More...
 
virtual void free (void *desc)=0
 
template<class T >
void decode (Inst *inst, T *&desc)
 void Info::free(void *desc); Free a GLISS instruction descriptor previously allocated by Info::decode(). More...
 

Protected Member Functions

virtual ~Info (void)
 

Detailed Description

This class provides access to the stay-behind GLISS data structures and code provided by the GLISS v2 utility used by some loaders.

This allows to re-use GLISS to embed ISA-specific processing inside some analysis (typically pipeline analysis).

The existence of this object is tied to the gliss::INFO_FEATURE and linked to the process with the identifier gliss::Info::ID.

Constructor & Destructor Documentation

otawa::gliss::Info::~Info ( void  )
protectedvirtual

Member Function Documentation

bool otawa::gliss::Info::check ( t::uint32  checksum)
pure virtual

As the validity of the data used in Gliss is strongly coupled with the data of an analysis using this object, OTAWA provides a way to generate a checksum of the file isa/id.h and to compare both values stored in the loader and in the analysis with this function.

If the check fails, it is utterly risky to use this structure.

Parameters
Checksumto check.
Returns
True, both checksum are compatible, false else.
void * otawa::gliss::Info::decode ( Inst inst)
pure virtual

Decode an instruction and return its descriptor.

The returned descriptor must be released with Info::free().

Parameters
instInstruction to decode.
Returns
Decoded instruction.

Referenced by decode().

template<class T >
void otawa::gliss::Info::decode< T > ( Inst inst,
T *&  desc 
)
inline

void Info::free(void *desc); Free a GLISS instruction descriptor previously allocated by Info::decode().

Parameters
descInstruction descriptor to release.

A type-wise way to perform the decoding of an instruction. The returned descriptor must be fried with Info::free().

References decode().

virtual void otawa::gliss::Info::free ( void *  desc)
pure virtual

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