1 //===-- SymbolizableModule.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 // This file declares the SymbolizableModule interface.
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
14 #define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
16 #include "llvm/DebugInfo/DIContext.h"
29 using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind;
31 class SymbolizableModule {
33 virtual ~SymbolizableModule() {}
34 virtual DILineInfo symbolizeCode(uint64_t ModuleOffset,
35 FunctionNameKind FNKind,
36 bool UseSymbolTable) const = 0;
37 virtual DIInliningInfo symbolizeInlinedCode(uint64_t ModuleOffset,
38 FunctionNameKind FNKind,
39 bool UseSymbolTable) const = 0;
40 virtual bool symbolizeData(uint64_t ModuleOffset, std::string &Name,
41 uint64_t &Start, uint64_t &Size) const = 0;
43 // Return true if this is a 32-bit x86 PE COFF module.
44 virtual bool isWin32Module() const = 0;
46 // Returns the preferred base of the module, i.e. where the loader would place
47 // it in memory assuming there were no conflicts.
48 virtual uint64_t getModulePreferredBase() const = 0;
51 } // namespace symbolize
54 #endif // LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H