1 //===-- DWARFDebugAbbrev.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SymbolFileDWARF_DWARFDebugAbbrev_h_
11 #define SymbolFileDWARF_DWARFDebugAbbrev_h_
16 #include "lldb/lldb-private.h"
18 #include "DWARFDefines.h"
19 #include "DWARFAbbreviationDeclaration.h"
21 typedef std::vector<DWARFAbbreviationDeclaration> DWARFAbbreviationDeclarationColl;
22 typedef DWARFAbbreviationDeclarationColl::iterator DWARFAbbreviationDeclarationCollIter;
23 typedef DWARFAbbreviationDeclarationColl::const_iterator DWARFAbbreviationDeclarationCollConstIter;
26 class DWARFAbbreviationDeclarationSet
29 DWARFAbbreviationDeclarationSet() :
30 m_offset(DW_INVALID_OFFSET),
36 DWARFAbbreviationDeclarationSet(dw_offset_t offset, uint32_t idx_offset) :
38 m_idx_offset(idx_offset),
44 dw_offset_t GetOffset() const { return m_offset; }
45 void Dump(lldb_private::Stream *s) const;
46 bool Extract(const lldb_private::DataExtractor& data, lldb::offset_t *offset_ptr);
47 //void Encode(BinaryStreamBuf& debug_abbrev_buf) const;
48 dw_uleb128_t AppendAbbrevDeclSequential(const DWARFAbbreviationDeclaration& abbrevDecl);
50 const DWARFAbbreviationDeclaration* GetAbbreviationDeclaration(dw_uleb128_t abbrCode) const;
53 uint32_t m_idx_offset;
54 std::vector<DWARFAbbreviationDeclaration> m_decls;
57 typedef std::map<dw_offset_t, DWARFAbbreviationDeclarationSet> DWARFAbbreviationDeclarationCollMap;
58 typedef DWARFAbbreviationDeclarationCollMap::iterator DWARFAbbreviationDeclarationCollMapIter;
59 typedef DWARFAbbreviationDeclarationCollMap::const_iterator DWARFAbbreviationDeclarationCollMapConstIter;
62 class DWARFDebugAbbrev
66 const DWARFAbbreviationDeclarationSet* GetAbbreviationDeclarationSet(dw_offset_t cu_abbr_offset) const;
67 void Dump(lldb_private::Stream *s) const;
68 void Parse(const lldb_private::DataExtractor& data);
70 DWARFAbbreviationDeclarationCollMap m_abbrevCollMap;
71 mutable DWARFAbbreviationDeclarationCollMapConstIter m_prev_abbr_offset_pos;
74 #endif // SymbolFileDWARF_DWARFDebugAbbrev_h_