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"
23 } // end namespace object
28 /// This data structure is the top level entity that deals with PDB debug
29 /// information parsing. This data structure exists only when there is a
30 /// need for a transparent interface to different debug information formats
31 /// (e.g. PDB and DWARF). More control and power over the debug information
32 /// access can be had by using the PDB interfaces directly.
33 class PDBContext : public DIContext {
35 PDBContext(const object::COFFObjectFile &Object,
36 std::unique_ptr<IPDBSession> PDBSession);
37 PDBContext(PDBContext &) = delete;
38 PDBContext &operator=(PDBContext &) = delete;
40 static bool classof(const DIContext *DICtx) {
41 return DICtx->getKind() == CK_PDB;
44 void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All,
45 bool DumpEH = false, bool SummarizeTypes = false) override;
47 DILineInfo getLineInfoForAddress(
49 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
50 DILineInfoTable getLineInfoForAddressRange(
51 uint64_t Address, uint64_t Size,
52 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
53 DIInliningInfo getInliningInfoForAddress(
55 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
58 std::string getFunctionName(uint64_t Address, DINameKind NameKind) const;
59 std::unique_ptr<IPDBSession> Session;
62 } // end namespace pdb
64 } // end namespace llvm
66 #endif // LLVM_DEBUGINFO_PDB_PDBCONTEXT_H