0e0b2c5f68e01a92c36a566fa25761bd2ef7ee8d
[oota-llvm.git] / include / llvm / DebugInfo / PDB / IPDBSession.h
1 //===- IPDBSession.h - base interface for a PDB symbol context --*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_DEBUGINFO_PDB_IPDBSESSION_H
11 #define LLVM_DEBUGINFO_PDB_IPDBSESSION_H
12
13 #include <memory>
14
15 #include "PDBTypes.h"
16
17 namespace llvm {
18
19 class PDBSymbolCompiland;
20 class PDBSymbolExe;
21
22 /// IPDBSession defines an interface used to provide a context for querying
23 /// debug information from a debug data source (for example, a PDB).
24 class IPDBSession {
25 public:
26   virtual ~IPDBSession();
27
28   virtual uint64_t getLoadAddress() const = 0;
29   virtual void setLoadAddress(uint64_t Address) = 0;
30   virtual std::unique_ptr<PDBSymbolExe> getGlobalScope() const = 0;
31   virtual std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const = 0;
32
33   virtual std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const = 0;
34   virtual std::unique_ptr<IPDBEnumSourceFiles>
35   getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const = 0;
36   virtual std::unique_ptr<IPDBSourceFile>
37   getSourceFileById(uint32_t FileId) const = 0;
38
39   virtual std::unique_ptr<IPDBEnumDataStreams> getDebugStreams() const = 0;
40 };
41 }
42
43 #endif