Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:46

0001 //===- SymbolizableModule.h -------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file declares the SymbolizableModule interface.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
0013 #define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
0014 
0015 #include "llvm/DebugInfo/DIContext.h"
0016 #include <cstdint>
0017 
0018 namespace llvm {
0019 namespace symbolize {
0020 
0021 using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind;
0022 
0023 class SymbolizableModule {
0024 public:
0025   virtual ~SymbolizableModule() = default;
0026 
0027   virtual DILineInfo symbolizeCode(object::SectionedAddress ModuleOffset,
0028                                    DILineInfoSpecifier LineInfoSpecifier,
0029                                    bool UseSymbolTable) const = 0;
0030   virtual DIInliningInfo
0031   symbolizeInlinedCode(object::SectionedAddress ModuleOffset,
0032                        DILineInfoSpecifier LineInfoSpecifier,
0033                        bool UseSymbolTable) const = 0;
0034   virtual DIGlobal
0035   symbolizeData(object::SectionedAddress ModuleOffset) const = 0;
0036   virtual std::vector<DILocal>
0037   symbolizeFrame(object::SectionedAddress ModuleOffset) const = 0;
0038 
0039   virtual std::vector<object::SectionedAddress>
0040   findSymbol(StringRef Symbol, uint64_t Offset) const = 0;
0041 
0042   // Return true if this is a 32-bit x86 PE COFF module.
0043   virtual bool isWin32Module() const = 0;
0044 
0045   // Returns the preferred base of the module, i.e. where the loader would place
0046   // it in memory assuming there were no conflicts.
0047   virtual uint64_t getModulePreferredBase() const = 0;
0048 };
0049 
0050 } // end namespace symbolize
0051 } // end namespace llvm
0052 
0053 #endif  // LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H