DWARFDataExtractor.h revision 314564
1257752Semaste//===-- DWARFDataExtractor.h ------------------------------------*- C++ -*-===// 2257752Semaste// 3257752Semaste// The LLVM Compiler Infrastructure 4257752Semaste// 5257752Semaste// This file is distributed under the University of Illinois Open Source 6257752Semaste// License. See LICENSE.TXT for details. 7257752Semaste// 8257752Semaste//===----------------------------------------------------------------------===// 9257752Semaste 10314564Sdim#ifndef liblldb_DWARFDataExtractor_h_ 11314564Sdim#define liblldb_DWARFDataExtractor_h_ 12257752Semaste 13257752Semaste// Other libraries and framework includes. 14257752Semaste#include "lldb/Core/DataExtractor.h" 15257752Semaste#include "lldb/Core/dwarf.h" 16257752Semaste 17257752Semastenamespace lldb_private { 18257752Semaste 19314564Sdimclass DWARFDataExtractor : public lldb_private::DataExtractor { 20257752Semastepublic: 21314564Sdim DWARFDataExtractor() : DataExtractor(), m_is_dwarf64(false) {} 22257752Semaste 23314564Sdim DWARFDataExtractor(const DWARFDataExtractor &data, lldb::offset_t offset, 24314564Sdim lldb::offset_t length) 25314564Sdim : DataExtractor(data, offset, length), m_is_dwarf64(false) {} 26257752Semaste 27314564Sdim uint64_t GetDWARFInitialLength(lldb::offset_t *offset_ptr) const; 28257752Semaste 29314564Sdim dw_offset_t GetDWARFOffset(lldb::offset_t *offset_ptr) const; 30257752Semaste 31314564Sdim size_t GetDWARFSizeofInitialLength() const { return m_is_dwarf64 ? 12 : 4; } 32257752Semaste 33314564Sdim bool IsDWARF64() const { return m_is_dwarf64; } 34280031Sdim 35257752Semasteprotected: 36314564Sdim mutable bool m_is_dwarf64; 37257752Semaste}; 38257752Semaste} 39257752Semaste 40314564Sdim#endif // liblldb_DWARFDataExtractor_h_ 41