20 #ifndef DWARFCFIAUTOMATON_H 21 #define DWARFCFIAUTOMATON_H 23 #include "pedigree/kernel/debugger/DwarfState.h" 24 #include "pedigree/kernel/processor/types.h" 31 #define DW_CFA_advance_loc 0x40 32 #define DW_CFA_offset 0x80 33 #define DW_CFA_restore 0xc0 35 #define DW_CFA_nop 0x00 36 #define DW_CFA_set_loc 0x01 37 #define DW_CFA_advance_loc1 0x02 38 #define DW_CFA_advance_loc2 0x03 39 #define DW_CFA_advance_loc4 0x04 40 #define DW_CFA_offset_extended 0x05 41 #define DW_CFA_restore_extended 0x06 42 #define DW_CFA_undefined 0x07 43 #define DW_CFA_same_value 0x08 44 #define DW_CFA_register 0x09 45 #define DW_CFA_remember_state 0x0a 46 #define DW_CFA_restore_state 0x0b 47 #define DW_CFA_def_cfa 0x0c 48 #define DW_CFA_def_cfa_register 0x0d 49 #define DW_CFA_def_cfa_offset 0x0e 50 #define DW_CFA_def_cfa_expression 0x0f 51 #define DW_CFA_expression 0x10 52 #define DW_CFA_offset_extended_sf 0x11 53 #define DW_CFA_def_cfa_sf 0x12 54 #define DW_CFA_def_cfa_offset_sf 0x13 55 #define DW_CFA_val_offset 0x14 56 #define DW_CFA_val_offset_sf 0x15 57 #define DW_CFA_val_expression 0x16 58 #define DW_CFA_lo_user 0x1c 59 #define DW_CFA_hi_user 0x3f 60 #define DW_CFA_GNU_args_size 0x2e // GNU extension 94 const DwarfState &startingState, uintptr_t nCodeLocation,
95 size_t nCodeLen, int32_t nCodeAlignmentFactor,
96 int32_t nDataAlignmentFactor, uintptr_t nStartingPc);
107 execute(uintptr_t nCodeLocation,
size_t nCodeLen, uintptr_t nBreakAt);
void initialise(const DwarfState &startingState, uintptr_t nCodeLocation, size_t nCodeLen, int32_t nCodeAlignmentFactor, int32_t nDataAlignmentFactor, uintptr_t nStartingPc)
DwarfState m_InitialState
DwarfState * execute(uintptr_t nCodeLocation, size_t nCodeLen, uintptr_t nBreakAt)
int32_t m_nDataAlignmentFactor
int32_t m_nCodeAlignmentFactor
void executeInstruction(uintptr_t &nLocation, uintptr_t &nPc)
DwarfState m_CurrentState