LCOV - code coverage report
Current view: top level - include/llvm/DebugInfo/PDB - IPDBSession.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 3 3 100.0 %
Date: 2018-07-13 00:08:38 Functions: 2 7 28.6 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "PDBSymbol.h"
      14             : #include "PDBTypes.h"
      15             : #include "llvm/ADT/StringRef.h"
      16             : #include "llvm/Support/Casting.h"
      17             : #include <memory>
      18             : 
      19             : namespace llvm {
      20             : namespace pdb {
      21             : class PDBSymbolCompiland;
      22             : class PDBSymbolExe;
      23             : 
      24             : /// IPDBSession defines an interface used to provide a context for querying
      25             : /// debug information from a debug data source (for example, a PDB).
      26         102 : class IPDBSession {
      27             : public:
      28             :   virtual ~IPDBSession();
      29             : 
      30             :   virtual uint64_t getLoadAddress() const = 0;
      31             :   virtual bool setLoadAddress(uint64_t Address) = 0;
      32             :   virtual std::unique_ptr<PDBSymbolExe> getGlobalScope() = 0;
      33             :   virtual std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const = 0;
      34             : 
      35             :   virtual bool addressForVA(uint64_t VA, uint32_t &Section,
      36             :                             uint32_t &Offset) const = 0;
      37             :   virtual bool addressForRVA(uint32_t RVA, uint32_t &Section,
      38             :                              uint32_t &Offset) const = 0;
      39             : 
      40             :   template <typename T>
      41           9 :   std::unique_ptr<T> getConcreteSymbolById(uint32_t SymbolId) const {
      42          18 :     return unique_dyn_cast_or_null<T>(getSymbolById(SymbolId));
      43             :   }
      44             : 
      45             :   virtual std::unique_ptr<PDBSymbol>
      46             :   findSymbolByAddress(uint64_t Address, PDB_SymType Type) const = 0;
      47             :   virtual std::unique_ptr<PDBSymbol>
      48             :   findSymbolByRVA(uint32_t RVA, PDB_SymType Type) const = 0;
      49             :   virtual std::unique_ptr<PDBSymbol>
      50             :   findSymbolBySectOffset(uint32_t Sect, uint32_t Offset,
      51             :                          PDB_SymType Type) const = 0;
      52             : 
      53             :   virtual std::unique_ptr<IPDBEnumLineNumbers>
      54             :   findLineNumbers(const PDBSymbolCompiland &Compiland,
      55             :                   const IPDBSourceFile &File) const = 0;
      56             :   virtual std::unique_ptr<IPDBEnumLineNumbers>
      57             :   findLineNumbersByAddress(uint64_t Address, uint32_t Length) const = 0;
      58             :   virtual std::unique_ptr<IPDBEnumLineNumbers>
      59             :   findLineNumbersByRVA(uint32_t RVA, uint32_t Length) const = 0;
      60             :   virtual std::unique_ptr<IPDBEnumLineNumbers>
      61             :   findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset,
      62             :                               uint32_t Length) const = 0;
      63             : 
      64             :   virtual std::unique_ptr<IPDBEnumSourceFiles>
      65             :   findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern,
      66             :                   PDB_NameSearchFlags Flags) const = 0;
      67             :   virtual std::unique_ptr<IPDBSourceFile>
      68             :   findOneSourceFile(const PDBSymbolCompiland *Compiland,
      69             :                     llvm::StringRef Pattern,
      70             :                     PDB_NameSearchFlags Flags) const = 0;
      71             :   virtual std::unique_ptr<IPDBEnumChildren<PDBSymbolCompiland>>
      72             :   findCompilandsForSourceFile(llvm::StringRef Pattern,
      73             :                               PDB_NameSearchFlags Flags) const = 0;
      74             :   virtual std::unique_ptr<PDBSymbolCompiland>
      75             :   findOneCompilandForSourceFile(llvm::StringRef Pattern,
      76             :                                 PDB_NameSearchFlags Flags) const = 0;
      77             : 
      78             :   virtual std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const = 0;
      79             :   virtual std::unique_ptr<IPDBEnumSourceFiles>
      80             :   getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const = 0;
      81             :   virtual std::unique_ptr<IPDBSourceFile>
      82             :   getSourceFileById(uint32_t FileId) const = 0;
      83             : 
      84             :   virtual std::unique_ptr<IPDBEnumDataStreams> getDebugStreams() const = 0;
      85             : 
      86             :   virtual std::unique_ptr<IPDBEnumTables> getEnumTables() const = 0;
      87             : 
      88             :   virtual std::unique_ptr<IPDBEnumInjectedSources>
      89             :   getInjectedSources() const = 0;
      90             : 
      91             :   virtual std::unique_ptr<IPDBEnumSectionContribs>
      92             :   getSectionContribs() const = 0;
      93             : };
      94             : } // namespace pdb
      95             : } // namespace llvm
      96             : 
      97             : #endif

Generated by: LCOV version 1.13