• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- SymbolizableModule.h ------------------------------------ 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 // This file declares the SymbolizableModule interface.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
14 #define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
15 
16 #include "llvm/DebugInfo/DIContext.h"
17 
18 namespace llvm {
19 namespace object {
20 class ObjectFile;
21 }
22 }
23 
24 namespace llvm {
25 namespace symbolize {
26 
27 using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind;
28 
29 class SymbolizableModule {
30 public:
~SymbolizableModule()31   virtual ~SymbolizableModule() {}
32   virtual DILineInfo symbolizeCode(uint64_t ModuleOffset,
33                                    FunctionNameKind FNKind,
34                                    bool UseSymbolTable) const = 0;
35   virtual DIInliningInfo symbolizeInlinedCode(uint64_t ModuleOffset,
36                                               FunctionNameKind FNKind,
37                                               bool UseSymbolTable) const = 0;
38   virtual DIGlobal symbolizeData(uint64_t ModuleOffset) const = 0;
39 
40   // Return true if this is a 32-bit x86 PE COFF module.
41   virtual bool isWin32Module() const = 0;
42 
43   // Returns the preferred base of the module, i.e. where the loader would place
44   // it in memory assuming there were no conflicts.
45   virtual uint64_t getModulePreferredBase() const = 0;
46 };
47 
48 }  // namespace symbolize
49 }  // namespace llvm
50 
51 #endif  // LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
52