LLVM  4.0.0
DWARFGdbIndex.h
Go to the documentation of this file.
1 //===-- DWARFGdbIndex.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 LLVM_LIB_DEBUGINFO_DWARFGDBINDEX_H
11 #define LLVM_LIB_DEBUGINFO_DWARFGDBINDEX_H
12 
14 #include "llvm/Support/Error.h"
16 
17 namespace llvm {
19  uint32_t Version;
20 
21  uint32_t CuListOffset;
22  uint32_t AddressAreaOffset;
23  uint32_t SymbolTableOffset;
24  uint32_t ConstantPoolOffset;
25 
26  struct CompUnitEntry {
27  uint64_t Offset; // Offset of a CU in the .debug_info section.
28  uint64_t Length; // Length of that CU.
29  };
31 
32  struct AddressEntry {
33  uint64_t LowAddress; // The low address.
34  uint64_t HighAddress; // The high address.
35  uint32_t CuIndex; // The CU index.
36  };
37  SmallVector<AddressEntry, 0> AddressArea;
38 
39  struct SymTableEntry {
40  uint32_t NameOffset; // Offset of the symbol's name in the constant pool.
41  uint32_t VecOffset; // Offset of the CU vector in the constant pool.
42  };
44 
45  // Each value is CU index + attributes.
47  ConstantPoolVectors;
48 
49  StringRef ConstantPoolStrings;
50  uint32_t StringPoolOffset;
51 
52  void dumpCUList(raw_ostream &OS) const;
53  void dumpAddressArea(raw_ostream &OS) const;
54  void dumpSymbolTable(raw_ostream &OS) const;
55  void dumpConstantPool(raw_ostream &OS) const;
56 
57  bool parseImpl(DataExtractor Data);
58 
59 public:
60  void dump(raw_ostream &OS);
61  void parse(DataExtractor Data);
62 
63  bool HasContent = false;
64  bool HasError = false;
65 };
66 }
67 
68 #endif // LLVM_LIB_DEBUGINFO_DWARFGDBINDEX_H
uint32_t Offset
void dump(raw_ostream &OS)
void parse(DataExtractor Data)
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47