1 //===-- DWARFCompileUnit.h --------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef SymbolFileDWARF_DWARFCompileUnit_h_ 11 #define SymbolFileDWARF_DWARFCompileUnit_h_ 12 13 #include "DWARFUnit.h" 14 15 class DWARFCompileUnit : public DWARFUnit { 16 public: 17 static DWARFUnitSP Extract(SymbolFileDWARF *dwarf2Data, 18 const lldb_private::DWARFDataExtractor &debug_info, 19 lldb::offset_t *offset_ptr); 20 void Dump(lldb_private::Stream *s) const override; 21 22 //------------------------------------------------------------------ 23 /// Get the data that contains the DIE information for this unit. 24 /// 25 /// @return 26 /// The correct data (.debug_types for DWARF 4 and earlier, and 27 /// .debug_info for DWARF 5 and later) for the DIE information in 28 /// this unit. 29 //------------------------------------------------------------------ 30 const lldb_private::DWARFDataExtractor &GetData() const override; 31 32 //------------------------------------------------------------------ 33 /// Get the size in bytes of the header. 34 /// 35 /// @return 36 /// Byte size of the compile unit header 37 //------------------------------------------------------------------ 38 uint32_t GetHeaderByteSize() const override; 39 40 private: 41 DWARFCompileUnit(SymbolFileDWARF *dwarf2Data); 42 DISALLOW_COPY_AND_ASSIGN(DWARFCompileUnit); 43 }; 44 45 #endif // SymbolFileDWARF_DWARFCompileUnit_h_ 46