The Pedigree Project 0.1
Public Types | Public Member Functions | Public Attributes | List of all members
DwarfState Class Reference

#include <DwarfState.h>

+ Collaboration diagram for DwarfState:

Public Types

enum  RegisterState {
  SameValue = 0 , Undefined , Offset , ValOffset ,
  Register , Expression , ValExpression , Architectural
}
 

Public Member Functions

 DwarfState (const DwarfState &other)
 
DwarfState & operator= (const DwarfState &other)
 
processor_register_t getCfa (const DwarfState &initialState) const
 
processor_register_t getRegister (unsigned int nRegister, const DwarfState &initialState) const
 

Public Attributes

RegisterState m_RegisterStates [DWARF_MAX_REGISTERS]
 
processor_register_t m_R [DWARF_MAX_REGISTERS]
 
RegisterState m_CfaState
 
uint32_t m_CfaRegister
 
processor_register_t m_CfaOffset
 
uint8_t * m_CfaExpression
 
uintptr_t m_ReturnAddress
 

Detailed Description

Holds one row of a Dwarf CFI table. We technically generate a table, but we only keep track of the current row.

Definition at line 65 of file DwarfState.h.

Member Enumeration Documentation

◆ RegisterState

enum DwarfState::RegisterState

Definition at line 67 of file DwarfState.h.

Constructor & Destructor Documentation

◆ DwarfState() [1/2]

DwarfState::DwarfState ( )
inline

Definition at line 78 of file DwarfState.h.

◆ ~DwarfState()

DwarfState::~DwarfState ( )
inline

Definition at line 87 of file DwarfState.h.

◆ DwarfState() [2/2]

DwarfState::DwarfState ( const DwarfState &  other)
inline

Copy constructor.

Definition at line 92 of file DwarfState.h.

References m_R, and m_RegisterStates.

Member Function Documentation

◆ getCfa()

processor_register_t DwarfState::getCfa ( const DwarfState &  initialState) const
inline

Definition at line 119 of file DwarfState.h.

◆ getRegister()

processor_register_t DwarfState::getRegister ( unsigned int  nRegister,
const DwarfState &  initialState 
) const
inline
Todo:
This needs to be better - we need to check if the CFA is borked so we don't try to do a stupid read - This requires VirtualAddressSpace, I think.

Definition at line 136 of file DwarfState.h.

References m_R, and m_RegisterStates.

◆ operator=()

DwarfState & DwarfState::operator= ( const DwarfState &  other)
inline

Definition at line 105 of file DwarfState.h.

Member Data Documentation

◆ m_CfaExpression

uint8_t* DwarfState::m_CfaExpression

Current CFA expression, if applicable.

Definition at line 217 of file DwarfState.h.

◆ m_CfaOffset

processor_register_t DwarfState::m_CfaOffset

Definition at line 213 of file DwarfState.h.

◆ m_CfaRegister

uint32_t DwarfState::m_CfaRegister

Current CFA register, and offset.

Definition at line 212 of file DwarfState.h.

Referenced by DwarfCfiAutomaton::executeInstruction().

◆ m_CfaState

RegisterState DwarfState::m_CfaState

Current CFA (current frame address) - first and most important column in the table.

Definition at line 208 of file DwarfState.h.

Referenced by DwarfCfiAutomaton::executeInstruction().

◆ m_R

processor_register_t DwarfState::m_R[DWARF_MAX_REGISTERS]

Registers (columns in the table).

Definition at line 202 of file DwarfState.h.

Referenced by DwarfState(), DwarfCfiAutomaton::executeInstruction(), and getRegister().

◆ m_RegisterStates

RegisterState DwarfState::m_RegisterStates[DWARF_MAX_REGISTERS]

Register states - these define how to interpret the m_R members.

Definition at line 197 of file DwarfState.h.

Referenced by DwarfState(), DwarfCfiAutomaton::executeInstruction(), and getRegister().

◆ m_ReturnAddress

uintptr_t DwarfState::m_ReturnAddress

The column which contains the function return address.

Definition at line 222 of file DwarfState.h.


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