Public Member Functions | Protected Member Functions | Protected Attributes
common_entry Class Referenceabstract
Inheritance diagram for common_entry:
ci_entry fd_entry

Public Member Functions

 common_entry ()
 
 common_entry (const eh_frame_t &eh_frame)
 
virtual ~common_entry ()=default
 
 common_entry (common_entry &&) noexcept=default
 
 common_entry (const common_entry &)=default
 
common_entryoperator= (common_entry &&) noexcept=default
 
common_entryoperator= (const common_entry &)=default
 
common_entryoperator++ ()
 
 operator bool () const
 
bool is_cie () const
 
bool is_fde () const
 
char * entry_start () const
 
char * entry_end () const
 
char * payload_start () const
 
char * payload_end () const
 
eh_frame_t eh_frame () const
 

Protected Member Functions

virtual void parse (char *addr)=0
 
void non_virtual_parse (char *addr)
 

Protected Attributes

bool m_is_cie
 
char * m_entry_start
 
char * m_entry_end
 
char * m_payload_start
 
char * m_payload_end
 
eh_frame_t m_eh_frame
 

Detailed Description

Common Entry

Both the CIE and the FDE share the length field. The length field can have two different sizes, so this class provides a simple way to describe the CIE/FDE itself (entry start / end), the portion of the CIE/FDE that does not include the length field (the payload), as well as some other functions for convenience.

Definition at line 219 of file eh_frame.h.

Constructor & Destructor Documentation

◆ common_entry() [1/4]

common_entry::common_entry ( )

Default Constructor

Creates an invalid CIE/FDE

Definition at line 130 of file eh_frame.cpp.

◆ common_entry() [2/4]

common_entry::common_entry ( const eh_frame_t eh_frame)
explicit

Constructor

Creates an invalid CIE/FDE, but stores the location of the beginning of the .eh_frame section.

Definition at line 140 of file eh_frame.cpp.

◆ ~common_entry()

virtual common_entry::~common_entry ( )
virtualdefault

Destructor

◆ common_entry() [3/4]

common_entry::common_entry ( common_entry &&  )
defaultnoexcept

Default Move Constructor

◆ common_entry() [4/4]

common_entry::common_entry ( const common_entry )
default

Default Copy Constructor

Member Function Documentation

◆ operator=() [1/2]

common_entry& common_entry::operator= ( common_entry &&  )
defaultnoexcept

Default Move Assignment Operator

◆ operator=() [2/2]

common_entry& common_entry::operator= ( const common_entry )
default

Default Copy Assignment Operator

◆ operator++()

common_entry & common_entry::operator++ ( )

Next CIE/FDE

Moves to the next CIE/FDE in the list. If the CIE/FDE is invalid, this function does nothing. If is possible that this function could result in an invalid CIE/FDE, which can be used in a for loop to determine when the end of the list has been approached.

Returns
next CIE/FDE

Definition at line 150 of file eh_frame.cpp.

◆ operator bool()

common_entry::operator bool ( ) const
inline

Valid

Returns
returns true if the CIE/FDE is valid

Definition at line 271 of file eh_frame.h.

◆ is_cie()

bool common_entry::is_cie ( ) const
inline

Is CIE

Returns
returns true if this is a CIE

Definition at line 278 of file eh_frame.h.

◆ is_fde()

bool common_entry::is_fde ( ) const
inline

Is FDE

Returns
returns true is this is an FDE

Definition at line 285 of file eh_frame.h.

◆ entry_start()

char* common_entry::entry_start ( ) const
inline

Entry Start

Returns
returns the start of the CIE/FDE in memory

Definition at line 292 of file eh_frame.h.

◆ entry_end()

char* common_entry::entry_end ( ) const
inline

Entry End

Returns
returns the end of the CIE/FDE in memory

Definition at line 299 of file eh_frame.h.

◆ payload_start()

char* common_entry::payload_start ( ) const
inline

Payload Start

Returns
returns the start of the CIE/FDE's payload in memory, which is the portion of the CIE/FDE that does not contain the length field

Definition at line 307 of file eh_frame.h.

◆ payload_end()

char* common_entry::payload_end ( ) const
inline

Payload End

Returns
returns the end of the CIE/FDE's payload in memory, which is the portion of the CIE/FDE that does not contain the length field. Note that this should be the same as entry_end

Definition at line 316 of file eh_frame.h.

◆ eh_frame()

eh_frame_t common_entry::eh_frame ( ) const
inline

EH Framework

Returns
returns the .eh_frame associated with this CIE/FDE

Definition at line 323 of file eh_frame.h.

◆ parse()

virtual void common_entry::parse ( char *  addr)
protectedpure virtual

Implemented in fd_entry, and ci_entry.

◆ non_virtual_parse()

void common_entry::non_virtual_parse ( char *  addr)
protected

Definition at line 164 of file eh_frame.cpp.

Field Documentation

◆ m_is_cie

bool common_entry::m_is_cie
protected

Definition at line 331 of file eh_frame.h.

◆ m_entry_start

char* common_entry::m_entry_start
protected

Definition at line 333 of file eh_frame.h.

◆ m_entry_end

char* common_entry::m_entry_end
protected

Definition at line 334 of file eh_frame.h.

◆ m_payload_start

char* common_entry::m_payload_start
protected

Definition at line 336 of file eh_frame.h.

◆ m_payload_end

char* common_entry::m_payload_end
protected

Definition at line 337 of file eh_frame.h.

◆ m_eh_frame

eh_frame_t common_entry::m_eh_frame
protected

Definition at line 339 of file eh_frame.h.


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