1//===- FDE.h --------------------------------------------------------------===// 2// 3// The MCLinker Project 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9#ifndef MCLD_LD_FRAME_DESCRIPTION_ENTRY_H 10#define MCLD_LD_FRAME_DESCRIPTION_ENTRY_H 11#ifdef ENABLE_UNITTEST 12#include <gtest.h> 13#endif 14 15#include <llvm/Support/DataTypes.h> 16#include <mcld/LD/CIE.h> 17#include <mcld/LD/RegionFragment.h> 18 19namespace mcld 20{ 21 22/** \class FDE 23 * \brief Frame Description Entry 24 * The FDE structure refers to LSB Core Spec 4.1, chap.10.6. Exception Frames. 25 */ 26class FDE : public RegionFragment 27{ 28public: 29 typedef uint32_t Offset; 30 31public: 32 FDE(MemoryRegion& pRegion, const CIE& pCIE, Offset pPCBeginOffset); 33 ~FDE(); 34 35 /// ----- observers ------ /// 36 /// getCIE - the CIE corresponding to this FDE 37 const CIE& getCIE() const 38 { return m_CIE; } 39 40 /// getPCBeginOffset - the offset to the FDE of the PC Begin field 41 Offset getPCBeginOffset() const 42 { return m_PCBeginOffset; } 43 44private: 45 const CIE& m_CIE; 46 Offset m_PCBeginOffset; 47}; 48 49} // namespace of mcld 50 51#endif 52 53