LLVM 22.0.0git
GsymContext.h
Go to the documentation of this file.
1//===-- GsymContext.h --------------------------------------------------===//
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_GSYM_GSYMCONTEXT_H
10#define LLVM_DEBUGINFO_GSYM_GSYMCONTEXT_H
11
13#include <cstdint>
14#include <memory>
15#include <string>
16
17namespace llvm {
18
19namespace gsym {
20
21class GsymReader;
22
23/// GSYM DI Context
24/// This data structure is the top level entity that deals with GSYM
25/// symbolication.
26/// This data structure exists only when there is a need for a transparent
27/// interface to different symbolication formats (e.g. GSYM, PDB and DWARF).
28/// More control and power over the debug information access can be had by using
29/// the GSYM interfaces directly.
30class GsymContext : public DIContext {
31public:
32 GsymContext(std::unique_ptr<GsymReader> Reader);
34
37
38 static bool classof(const DIContext *DICtx) {
39 return DICtx->getKind() == CK_GSYM;
40 }
41
42 void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override;
43
44 std::optional<DILineInfo> getLineInfoForAddress(
46 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
47 std::optional<DILineInfo>
51 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
54 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
55
56 std::vector<DILocal>
58
59private:
60 const std::unique_ptr<GsymReader> Reader;
61};
62
63} // end namespace gsym
64
65} // end namespace llvm
66
67#endif // LLVM_DEBUGINFO_GSYM_GSYMCONTEXT_H
uint64_t Size
raw_pwrite_stream & OS
DIContextKind getKind() const
Definition: DIContext.h:247
A format-neutral container for inlined code description.
Definition: DIContext.h:94
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
GSYM DI Context This data structure is the top level entity that deals with GSYM symbolication.
Definition: GsymContext.h:30
static bool classof(const DIContext *DICtx)
Definition: GsymContext.h:38
DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
GsymContext & operator=(GsymContext &)=delete
GsymContext(GsymContext &)=delete
std::optional< DILineInfo > getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: GsymContext.cpp:65
void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override
Definition: GsymContext.cpp:21
std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address) override
std::optional< DILineInfo > getLineInfoForDataAddress(object::SectionedAddress Address) override
Definition: GsymContext.cpp:97
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:196
Controls which fields of DILineInfo container should be filled with data.
Definition: DIContext.h:146