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)
 
DwarfStateoperator= (const DwarfState &other)
 
processor_register_t getCfa (const DwarfState &initialState)
 
processor_register_t getRegister (unsigned int nRegister, const DwarfState &initialState)
 

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 142 of file DwarfState.h.

Constructor & Destructor Documentation

DwarfState::DwarfState ( const DwarfState other)
inline

Copy constructor.

Definition at line 175 of file DwarfState.h.

References ERROR, m_CfaExpression, m_CfaRegister, m_CfaState, m_R, m_RegisterStates, m_ReturnAddress, and WARNING.

Member Function Documentation

processor_register_t DwarfState::getRegister ( unsigned int  nRegister,
const DwarfState initialState 
)
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 230 of file DwarfState.h.

References m_R, m_RegisterStates, and WARNING.

Referenced by DwarfUnwinder::unwind().

+ Here is the caller graph for this function:

Member Data Documentation

uint8_t* DwarfState::m_CfaExpression

Current CFA expression, if applicable.

Definition at line 321 of file DwarfState.h.

Referenced by DwarfState().

uint32_t DwarfState::m_CfaRegister

Current CFA register, and offset.

Definition at line 316 of file DwarfState.h.

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

RegisterState DwarfState::m_CfaState

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

Definition at line 312 of file DwarfState.h.

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

processor_register_t DwarfState::m_R[DWARF_MAX_REGISTERS]

Registers (columns in the table).

Definition at line 306 of file DwarfState.h.

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

RegisterState DwarfState::m_RegisterStates[DWARF_MAX_REGISTERS]

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

Definition at line 301 of file DwarfState.h.

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

uintptr_t DwarfState::m_ReturnAddress

The column which contains the function return address.

Definition at line 326 of file DwarfState.h.

Referenced by DwarfState().


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