OpenASIP  2.0
Public Types | Public Member Functions | Protected Attributes | List of all members
TPEF::DebugElement Class Referenceabstract

#include <DebugElement.hh>

Inheritance diagram for TPEF::DebugElement:
Inheritance graph
Collaboration diagram for TPEF::DebugElement:
Collaboration graph

Public Types

enum  ElementType { DE_STAB = 0x1 }
 

Public Member Functions

 DebugElement ()
 
virtual ~DebugElement ()
 
virtual ElementType type () const =0
 
ChunkdebugString () const
 
void setDebugString (const ReferenceManager::SafePointer *aString)
 
void setDebugString (Chunk *aString)
 
virtual Byte byte (Word index) const =0
 Returns one byte of additional data. More...
 
virtual Word length () const =0
 Returns the length of additional data of debug element. More...
 
- Public Member Functions inherited from TPEF::SectionElement
virtual ~SectionElement ()
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Protected Attributes

const ReferenceManager::SafePointerdebugString_
 String of debug element. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TPEF::SectionElement
 SectionElement ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Detailed Description

Base class for all kinds of TPEF elements that belong to debug sections.

Allows representing data of any debug element. All types of TPEF debug elements share a common property: a string that defines (part of) the information stored in the element.

Definition at line 56 of file DebugElement.hh.

Member Enumeration Documentation

◆ ElementType

Enumerator
DE_STAB 

Definition at line 58 of file DebugElement.hh.

58  {
59  DE_STAB = 0x1
60  };

Constructor & Destructor Documentation

◆ DebugElement()

TPEF::DebugElement::DebugElement ( )

Constructor.

Definition at line 43 of file DebugElement.cc.

43  : SectionElement() {
44 }

◆ ~DebugElement()

TPEF::DebugElement::~DebugElement ( )
virtual

Destructor.

Definition at line 49 of file DebugElement.cc.

49  {
50 }

Member Function Documentation

◆ byte()

virtual Byte TPEF::DebugElement::byte ( Word  index) const
pure virtual

Returns one byte of additional data.

Implemented in TPEF::DebugStabElem.

Referenced by TPEF::TPEFDebugSectionWriter::actualWriteData(), and TPEFDumper::section().

◆ debugString()

Chunk * TPEF::DebugElement::debugString ( ) const

Returns the debug string.

Returns
Debug string.

Definition at line 58 of file DebugElement.cc.

58  {
59  return dynamic_cast<Chunk*>(debugString_->pointer());
60 }

References debugString_, and TPEF::ReferenceManager::SafePointer::pointer().

Referenced by TPEF::TPEFDebugSectionWriter::actualWriteData(), and TPEFDumper::section().

Here is the call graph for this function:

◆ length()

virtual Word TPEF::DebugElement::length ( ) const
pure virtual

Returns the length of additional data of debug element.

Implemented in TPEF::DebugStabElem.

Referenced by TPEF::TPEFDebugSectionWriter::actualWriteData(), and TPEFDumper::section().

◆ setDebugString() [1/2]

void TPEF::DebugElement::setDebugString ( Chunk aString)

Sets the debug string.

Parameters
aStringThe debug string.

Definition at line 78 of file DebugElement.cc.

78  {
79  using namespace ReferenceManager;
81 }

References debugString_, and TPEF::ReferenceManager::SafePointer::replaceReference().

Here is the call graph for this function:

◆ setDebugString() [2/2]

void TPEF::DebugElement::setDebugString ( const ReferenceManager::SafePointer aString)

Sets the debug string.

Parameters
aStringDebug string to set.

Definition at line 68 of file DebugElement.cc.

68  {
69  debugString_ = aString;
70 }

References debugString_.

Referenced by TPEF::AOutSymbolSectionReader::initializeSymbol(), and TPEF::TPEFDebugSectionReader::readData().

◆ type()

virtual ElementType TPEF::DebugElement::type ( ) const
pure virtual

Member Data Documentation

◆ debugString_

const ReferenceManager::SafePointer* TPEF::DebugElement::debugString_
protected

String of debug element.

Definition at line 78 of file DebugElement.hh.

Referenced by debugString(), and setDebugString().


The documentation for this class was generated from the following files:
TPEF::ReferenceManager::SafePointer::replaceReference
static const SafePointer * replaceReference(const SafePointer *old, SafePointable *obj)
TPEF::SectionElement::SectionElement
SectionElement()
Definition: SectionElement.cc:41
TPEF::DebugElement::DE_STAB
@ DE_STAB
Definition: DebugElement.hh:59
TPEF::ReferenceManager::SafePointer::pointer
SafePointable * pointer() const
TPEF::DebugElement::debugString_
const ReferenceManager::SafePointer * debugString_
String of debug element.
Definition: DebugElement.hh:78