1 //===- DWARFDebugPubTable.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 LLVM_DEBUGINFO_DWARF_DWARFDEBUGPUBTABLE_H
11 #define LLVM_DEBUGINFO_DWARF_DWARFDEBUGPUBTABLE_H
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/BinaryFormat/Dwarf.h"
16 #include "llvm/DebugInfo/DWARF/DWARFObject.h"
24 /// Represents structure for holding and parsing .debug_pub* tables.
25 class DWARFDebugPubTable {
28 /// Section offset from the beginning of the compilation unit.
31 /// An entry of the various gnu_pub* debug sections.
32 dwarf::PubIndexEntryDescriptor Descriptor;
34 /// The name of the object as given by the DW_AT_name attribute of the
39 /// Each table consists of sets of variable length entries. Each set describes
40 /// the names of global objects and functions, or global types, respectively,
41 /// whose definitions are represented by debugging information entries owned
42 /// by a single compilation unit.
44 /// The total length of the entries for that set, not including the length
48 /// This number is specific to the name lookup table and is independent of
49 /// the DWARF version number.
52 /// The offset from the beginning of the .debug_info section of the
53 /// compilation unit header referenced by the set.
56 /// The size in bytes of the contents of the .debug_info section generated
57 /// to represent that compilation unit.
60 std::vector<Entry> Entries;
64 std::vector<Set> Sets;
66 /// gnu styled tables contains additional information.
67 /// This flag determines whether or not section we parse is debug_gnu* table.
71 DWARFDebugPubTable(const DWARFObject &Obj, const DWARFSection &Sec,
72 bool LittleEndian, bool GnuStyle);
74 void dump(raw_ostream &OS) const;
76 ArrayRef<Set> getData() { return Sets; }
79 } // end namespace llvm
81 #endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGPUBTABLE_H