Dyninst::Dwarf::DwarfFrameParser Class Reference

#include <dwarfFrameParser.h>

Public Types

typedef boost::shared_ptr
< DwarfFrameParser
Ptr

Public Member Functions

 DwarfFrameParser (Dwarf_Debug dbg_, Architecture arch)
 ~DwarfFrameParser ()
bool hasFrameDebugInfo ()
bool getRegRepAtFrame (Address pc, MachRegister reg, VariableLocation &loc, FrameErrors_t &err_result)
bool getRegValueAtFrame (Address pc, MachRegister reg, MachRegisterVal &reg_result, ProcessReader *reader, FrameErrors_t &err_result)
bool getRegAtFrame (Address pc, MachRegister reg, DwarfResult &cons, FrameErrors_t &err_result)
bool getRegsForFunction (Address entryPC, MachRegister reg, std::vector< VariableLocation > &locs, FrameErrors_t &err_result)

Static Public Member Functions

static Ptr create (Dwarf_Debug dbg, Architecture arch)

Private Types

enum  dwarf_status_t { dwarf_status_uninitialized, dwarf_status_error, dwarf_status_ok }

Private Member Functions

bool getRegAtFrame_aux (Address pc, Dwarf_Fde fde, Dwarf_Half dwarf_reg, MachRegister orig_reg, DwarfResult &cons, Address &lowpc, FrameErrors_t &err_result)
bool getFDE (Address pc, Dwarf_Fde &fde, Address &low, Address &high, FrameErrors_t &err_result)
bool getDwarfReg (MachRegister reg, Dwarf_Fde &fde, Dwarf_Half &dwarf_reg, FrameErrors_t &err_result)
bool handleExpression (Address pc, Dwarf_Signed registerNum, MachRegister origReg, Architecture arch, DwarfResult &cons, bool &done, FrameErrors_t &err_result)
void setupFdeData ()

Private Attributes

Dwarf_Debug dbg
Architecture arch
dwarf_status_t fde_dwarf_status
std::vector< fde_cie_datafde_data

Static Private Attributes

static std::map< Dwarf_Debug, PtrframeParsers

Detailed Description

Definition at line 63 of file dwarfFrameParser.h.


Member Typedef Documentation

Definition at line 66 of file dwarfFrameParser.h.


Member Enumeration Documentation

Enumerator:
dwarf_status_uninitialized 
dwarf_status_error 
dwarf_status_ok 

Definition at line 132 of file dwarfFrameParser.h.


Constructor & Destructor Documentation

DwarfFrameParser::DwarfFrameParser ( Dwarf_Debug  dbg_,
Architecture  arch 
)

Definition at line 61 of file dwarfFrameParser.C.

Referenced by create().

DwarfFrameParser::~DwarfFrameParser (  ) 

Definition at line 68 of file dwarfFrameParser.C.

References dbg, dwarf_status_ok, fde_data, and fde_dwarf_status.


Member Function Documentation

DwarfFrameParser::Ptr DwarfFrameParser::create ( Dwarf_Debug  dbg,
Architecture  arch 
) [static]
bool DwarfFrameParser::getDwarfReg ( Dyninst::MachRegister  reg,
Dwarf_Fde &  fde,
Dwarf_Half &  dwarf_reg,
FrameErrors_t err_result 
) [private]

We should be getting the return address for the stack frame. This is treated as a virtual register in the FDE. We can look up the virtual register in the CIE.

Definition at line 453 of file dwarfFrameParser.C.

References DW_FRAME_CFA_COL3, Dyninst::Dwarf::FE_Bad_Frame_Data, and Dyninst::MachRegister::getDwarfEnc().

Referenced by getRegAtFrame(), and getRegsForFunction().

bool DwarfFrameParser::getFDE ( Address  pc,
Dwarf_Fde &  fde,
Address low,
Address high,
FrameErrors_t err_result 
) [private]
bool DwarfFrameParser::getRegAtFrame ( Address  pc,
Dyninst::MachRegister  reg,
DwarfResult cons,
FrameErrors_t err_result 
)

Initialize the FDE and CIE data. This is only really done once, after which setupFdeData will immediately return.

Get the FDE at this PC. The FDE contains the rules for getting registers at the given PC in this frame.

Definition at line 203 of file dwarfFrameParser.C.

References dwarf_printf, fde_data, Dyninst::Dwarf::FE_Bad_Frame_Data, Dyninst::Dwarf::FE_No_Error, getDwarfReg(), getFDE(), getRegAtFrame_aux(), Dyninst::MachRegister::name(), and setupFdeData().

Referenced by getRegRepAtFrame(), getRegValueAtFrame(), and handleExpression().

bool DwarfFrameParser::getRegAtFrame_aux ( Address  pc,
Dwarf_Fde  fde,
Dwarf_Half  dwarf_reg,
MachRegister  orig_reg,
DwarfResult cons,
Address lowpc,
FrameErrors_t err_result 
) [private]
bool DwarfFrameParser::getRegRepAtFrame ( Address  pc,
Dyninst::MachRegister  reg,
VariableLocation loc,
FrameErrors_t err_result 
)
bool DwarfFrameParser::getRegsForFunction ( Address  entryPC,
Dyninst::MachRegister  reg,
std::vector< VariableLocation > &  locs,
FrameErrors_t err_result 
)

Initialize the FDE and CIE data. This is only really done once, after which setupFdeData will immediately return.

Get the FDE at this PC. The FDE contains the rules for getting registers at the given PC in this frame.

Definition at line 141 of file dwarfFrameParser.C.

References arch, dwarf_printf, fde_data, Dyninst::Dwarf::FE_Bad_Frame_Data, Dyninst::Dwarf::FE_No_Error, getDwarfReg(), getFDE(), getRegAtFrame_aux(), Dyninst::MachRegister::name(), setupFdeData(), and Dyninst::Dwarf::SymbolicDwarfResult::val().

bool DwarfFrameParser::getRegValueAtFrame ( Address  pc,
Dyninst::MachRegister  reg,
Dyninst::MachRegisterVal reg_result,
ProcessReader reader,
FrameErrors_t err_result 
)
bool DwarfFrameParser::handleExpression ( Address  pc,
Dwarf_Signed  registerNum,
Dyninst::MachRegister  origReg,
Dyninst::Architecture  arch,
DwarfResult cons,
bool &  done,
FrameErrors_t err_result 
) [private]
bool DwarfFrameParser::hasFrameDebugInfo (  ) 

Definition at line 80 of file dwarfFrameParser.C.

References dwarf_status_ok, fde_dwarf_status, and setupFdeData().

void DwarfFrameParser::setupFdeData (  )  [private]

Field Documentation

Definition at line 139 of file dwarfFrameParser.h.

Referenced by hasFrameDebugInfo(), setupFdeData(), and ~DwarfFrameParser().

std::map< Dwarf_Debug, DwarfFrameParser::Ptr > DwarfFrameParser::frameParsers [static, private]

Definition at line 130 of file dwarfFrameParser.h.

Referenced by create().


The documentation for this class was generated from the following files:
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1