LLVM 19.0.0git
PDBContext.h
Go to the documentation of this file.
1//===-- PDBContext.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_PDB_PDBCONTEXT_H
10#define LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
11
14#include <cstdint>
15#include <memory>
16#include <string>
17
18namespace llvm {
19
20namespace object {
21class COFFObjectFile;
22} // end namespace object
23
24namespace pdb {
25
26 /// PDBContext
27 /// This data structure is the top level entity that deals with PDB debug
28 /// information parsing. This data structure exists only when there is a
29 /// need for a transparent interface to different debug information formats
30 /// (e.g. PDB and DWARF). More control and power over the debug information
31 /// access can be had by using the PDB interfaces directly.
32 class PDBContext : public DIContext {
33 public:
35 std::unique_ptr<IPDBSession> PDBSession);
38
39 static bool classof(const DIContext *DICtx) {
40 return DICtx->getKind() == CK_PDB;
41 }
42
43 void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override;
44
47 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
52 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
55 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
56
57 std::vector<DILocal>
59
60 private:
61 std::string getFunctionName(uint64_t Address, DINameKind NameKind) const;
62 std::unique_ptr<IPDBSession> Session;
63 };
64
65} // end namespace pdb
66
67} // end namespace llvm
68
69#endif // LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
uint64_t Size
raw_pwrite_stream & OS
DIContextKind getKind() const
Definition: DIContext.h:243
A format-neutral container for inlined code description.
Definition: DIContext.h:92
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
PDBContext This data structure is the top level entity that deals with PDB debug information parsing.
Definition: PDBContext.h:32
PDBContext & operator=(PDBContext &)=delete
DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: PDBContext.cpp:75
static bool classof(const DIContext *DICtx)
Definition: PDBContext.h:39
DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: PDBContext.cpp:95
std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address) override
Definition: PDBContext.cpp:139
DILineInfo getLineInfoForDataAddress(object::SectionedAddress Address) override
Definition: PDBContext.cpp:68
PDBContext(PDBContext &)=delete
DILineInfo getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: PDBContext.cpp:35
void dump(raw_ostream &OS, DIDumpOptions DIDumpOpts) override
Definition: PDBContext.cpp:33
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
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
Definition: DIContext.h:140
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:193
Controls which fields of DILineInfo container should be filled with data.
Definition: DIContext.h:144
A format-neutral container for source line information.
Definition: DIContext.h:32