LLVM 19.0.0git
DWARFGdbIndex.h
Go to the documentation of this file.
1//===- DWARFGdbIndex.h ------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_DWARF_DWARFGDBINDEX_H
10#define LLVM_DEBUGINFO_DWARF_DWARFGDBINDEX_H
11
13#include "llvm/ADT/StringRef.h"
14#include <cstdint>
15#include <utility>
16
17namespace llvm {
18
19class raw_ostream;
20class DataExtractor;
21
23 uint32_t Version;
24
25 uint32_t CuListOffset;
26 uint32_t TuListOffset;
27 uint32_t AddressAreaOffset;
28 uint32_t SymbolTableOffset;
29 uint32_t ConstantPoolOffset;
30
31 struct CompUnitEntry {
32 uint64_t Offset; /// Offset of a CU in the .debug_info section.
33 uint64_t Length; /// Length of that CU.
34 };
36
37 struct TypeUnitEntry {
38 uint64_t Offset;
39 uint64_t TypeOffset;
40 uint64_t TypeSignature;
41 };
43
44 struct AddressEntry {
45 uint64_t LowAddress; /// The low address.
46 uint64_t HighAddress; /// The high address.
47 uint32_t CuIndex; /// The CU index.
48 };
50
51 struct SymTableEntry {
52 uint32_t NameOffset; /// Offset of the symbol's name in the constant pool.
53 uint32_t VecOffset; /// Offset of the CU vector in the constant pool.
54 };
56
57 /// Each value is CU index + attributes.
59 ConstantPoolVectors;
60
61 StringRef ConstantPoolStrings;
62 uint32_t StringPoolOffset;
63
64 void dumpCUList(raw_ostream &OS) const;
65 void dumpTUList(raw_ostream &OS) const;
66 void dumpAddressArea(raw_ostream &OS) const;
67 void dumpSymbolTable(raw_ostream &OS) const;
68 void dumpConstantPool(raw_ostream &OS) const;
69
70 bool parseImpl(DataExtractor Data);
71
72public:
73 void dump(raw_ostream &OS);
75
76 bool HasContent = false;
77 bool HasError = false;
78};
79
80} // end namespace llvm
81
82#endif // LLVM_DEBUGINFO_DWARF_DWARFGDBINDEX_H
raw_pwrite_stream & OS
This file defines the SmallVector class.
void dump(raw_ostream &OS)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Length
Definition: DWP.cpp:456
Definition: regcomp.c:192