1 //===-- PDBContext.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_PDB_PDBCONTEXT_H
11 #define LLVM_DEBUGINFO_PDB_PDBCONTEXT_H
13 #include "llvm/DebugInfo/DIContext.h"
14 #include "llvm/DebugInfo/PDB/IPDBSession.h"
24 /// This data structure is the top level entity that deals with PDB debug
25 /// information parsing. This data structure exists only when there is a
26 /// need for a transparent interface to different debug information formats
27 /// (e.g. PDB and DWARF). More control and power over the debug information
28 /// access can be had by using the PDB interfaces directly.
29 class PDBContext : public DIContext {
31 PDBContext(PDBContext &) = delete;
32 PDBContext &operator=(PDBContext &) = delete;
35 PDBContext(const object::COFFObjectFile &Object,
36 std::unique_ptr<IPDBSession> PDBSession);
38 static bool classof(const DIContext *DICtx) {
39 return DICtx->getKind() == CK_PDB;
42 void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All,
43 bool DumpEH = false) override;
45 DILineInfo getLineInfoForAddress(
47 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
48 DILineInfoTable getLineInfoForAddressRange(
49 uint64_t Address, uint64_t Size,
50 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
51 DIInliningInfo getInliningInfoForAddress(
53 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
56 std::string getFunctionName(uint64_t Address, DINameKind NameKind) const;
57 std::unique_ptr<IPDBSession> Session;