OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
TPEF::LineNumSection Class Reference

#include <LineNumSection.hh>

Inheritance diagram for TPEF::LineNumSection:
Inheritance graph
Collaboration diagram for TPEF::LineNumSection:
Collaboration graph

Public Member Functions

virtual ~LineNumSection ()
 
virtual SectionType type () const
 
void setCodeSection (const ReferenceManager::SafePointer *codeSect)
 
void setCodeSection (CodeSection *codeSect)
 
CodeSectioncodeSection () const
 
- Public Member Functions inherited from TPEF::Section
virtual ~Section ()
 
virtual bool isChunkable () const
 
virtual Chunkchunk (SectionOffset offset) const
 
bool isProgramSection () const
 
bool isAuxSection () const
 
virtual void addElement (SectionElement *element)
 
virtual void setElement (Word index, SectionElement *element)
 
SectionElementelement (Word index) const
 
Word elementCount () const
 
void setFlagNoBits ()
 
void unsetFlagNoBits ()
 
bool noBits () const
 
bool vLen () const
 
Byte flags () const
 
void setFlags (Byte flagByte)
 
void setStartingAddress (AddressImage address)
 
AddressImage startingAddress () const
 
void setLink (const ReferenceManager::SafePointer *aLink)
 
void setLink (Section *aLink)
 
Sectionlink () const
 
void setASpace (const ReferenceManager::SafePointer *addrSpace)
 
void setASpace (ASpaceElement *addrSpace)
 
ASpaceElementaSpace () const
 
void setName (const ReferenceManager::SafePointer *sectionName)
 
void setName (Chunk *sectionName)
 
Chunkname () const
 
virtual bool isDataSection () const
 
virtual bool isCodeSection () const
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Protected Member Functions

 LineNumSection (bool init)
 
virtual Sectionclone () const
 
- Protected Member Functions inherited from TPEF::Section
 Section ()
 
void setFlagVLen ()
 
void unsetFlagVLen ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Private Attributes

const ReferenceManager::SafePointercodeSection_
 Stores text section which we refer with lines. More...
 

Static Private Attributes

static LineNumSection proto_
 Protorype instance of section. More...
 

Additional Inherited Members

- Public Types inherited from TPEF::Section
enum  SectionType {
  ST_NULL = 0x00, ST_STRTAB = 0x01, ST_SYMTAB = 0x02, ST_DEBUG = 0x03,
  ST_RELOC = 0x04, ST_LINENO = 0x05, ST_NOTE = 0x06, ST_ADDRSP = 0x07,
  ST_MR = 0x0A, ST_CODE = 0x81, ST_DATA = 0x82, ST_UDATA = 0x83,
  ST_LEDATA = 0x84, ST_DUMMY = 0xff
}
 
enum  SectionFlag { SF_VLEN = 0x40, SF_NOBITS = 0x80 }
 
- Static Public Member Functions inherited from TPEF::Section
static SectioncreateSection (SectionType type)
 
static bool isProgramSection (SectionType type)
 
- Static Protected Member Functions inherited from TPEF::Section
static void registerSection (const Section *section)
 

Detailed Description

Prosessor Line number section.

Definition at line 47 of file LineNumSection.hh.

Constructor & Destructor Documentation

◆ ~LineNumSection()

TPEF::LineNumSection::~LineNumSection ( )
virtual

Destructor.

Definition at line 62 of file LineNumSection.cc.

62  {
63 }

◆ LineNumSection()

TPEF::LineNumSection::LineNumSection ( bool  init)
protected

Constructor.

Parameters
initTrue if instance should register itself to base class.

Definition at line 47 of file LineNumSection.cc.

47  : Section(),
49 
50  if (init) {
52  }
53 
55  unsetFlagVLen();
57 }

References TPEF::Section::registerSection(), TPEF::Section::setStartingAddress(), TPEF::Section::unsetFlagNoBits(), and TPEF::Section::unsetFlagVLen().

Referenced by clone().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

Section * TPEF::LineNumSection::clone ( ) const
protectedvirtual

Creates an instance of section.

Returns
Newly created section.

Implements TPEF::Section.

Definition at line 81 of file LineNumSection.cc.

81  {
82  return new LineNumSection(false);
83 }

References LineNumSection().

Here is the call graph for this function:

◆ codeSection()

CodeSection * TPEF::LineNumSection::codeSection ( ) const

Returns text section which lines are stored in this section.

Returns
Text section which lines are stored in this section.

Definition at line 112 of file LineNumSection.cc.

112  {
113  return dynamic_cast<CodeSection*>(codeSection_->pointer());
114 }

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

Here is the call graph for this function:

◆ setCodeSection() [1/2]

void TPEF::LineNumSection::setCodeSection ( CodeSection codeSect)

Sets text section which instructions are referred in this section.

Parameters
Sectionto set.

Definition at line 102 of file LineNumSection.cc.

102  {
104 }

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

Here is the call graph for this function:

◆ setCodeSection() [2/2]

void TPEF::LineNumSection::setCodeSection ( const ReferenceManager::SafePointer codeSect)

Sets text section which instructions are referred in this section.

Parameters
Sectionto set.

Definition at line 91 of file LineNumSection.cc.

92  {
93  codeSection_ = codeSect;
94 }

References codeSection_.

◆ type()

Section::SectionType TPEF::LineNumSection::type ( ) const
virtual

Returns section's type.

Returns
Type of section.

Implements TPEF::Section.

Definition at line 71 of file LineNumSection.cc.

71  {
72  return ST_LINENO;
73 }

References TPEF::Section::ST_LINENO.

Member Data Documentation

◆ codeSection_

const ReferenceManager::SafePointer* TPEF::LineNumSection::codeSection_
private

Stores text section which we refer with lines.

Definition at line 63 of file LineNumSection.hh.

Referenced by codeSection(), and setCodeSection().

◆ proto_

LineNumSection TPEF::LineNumSection::proto_
staticprivate

Protorype instance of section.

Definition at line 65 of file LineNumSection.hh.


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::LineNumSection::codeSection_
const ReferenceManager::SafePointer * codeSection_
Stores text section which we refer with lines.
Definition: LineNumSection.hh:63
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::ReferenceManager::SafePointer::null
static const SafePointer null
The default SafePointer that is used in null references.
Definition: SafePointer.hh:229
TPEF::Section::Section
Section()
Definition: Section.cc:64
TPEF::LineNumSection::LineNumSection
LineNumSection(bool init)
Definition: LineNumSection.cc:47
TPEF::ReferenceManager::SafePointer::pointer
SafePointable * pointer() const
TPEF::Section::unsetFlagNoBits
void unsetFlagNoBits()
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition: Section.cc:114
TPEF::Section::ST_LINENO
@ ST_LINENO
Line number section.
Definition: Section.hh:75