1321369Sdim//===- SymbolizableModule.h -------------------------------------*- C++ -*-===//
2292915Sdim//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6292915Sdim//
7292915Sdim//===----------------------------------------------------------------------===//
8292915Sdim//
9292915Sdim// This file declares the SymbolizableModule interface.
10292915Sdim//
11292915Sdim//===----------------------------------------------------------------------===//
12292915Sdim#ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
13292915Sdim#define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
14292915Sdim
15292915Sdim#include "llvm/DebugInfo/DIContext.h"
16321369Sdim#include <cstdint>
17292915Sdim
18292915Sdimnamespace llvm {
19292915Sdimnamespace symbolize {
20292915Sdim
21292915Sdimusing FunctionNameKind = DILineInfoSpecifier::FunctionNameKind;
22292915Sdim
23292915Sdimclass SymbolizableModule {
24292915Sdimpublic:
25321369Sdim  virtual ~SymbolizableModule() = default;
26321369Sdim
27353358Sdim  virtual DILineInfo symbolizeCode(object::SectionedAddress ModuleOffset,
28292915Sdim                                   FunctionNameKind FNKind,
29292915Sdim                                   bool UseSymbolTable) const = 0;
30353358Sdim  virtual DIInliningInfo
31353358Sdim  symbolizeInlinedCode(object::SectionedAddress ModuleOffset,
32353358Sdim                       FunctionNameKind FNKind, bool UseSymbolTable) const = 0;
33353358Sdim  virtual DIGlobal
34353358Sdim  symbolizeData(object::SectionedAddress ModuleOffset) const = 0;
35353358Sdim  virtual std::vector<DILocal>
36353358Sdim  symbolizeFrame(object::SectionedAddress ModuleOffset) const = 0;
37292915Sdim
38292915Sdim  // Return true if this is a 32-bit x86 PE COFF module.
39292915Sdim  virtual bool isWin32Module() const = 0;
40292915Sdim
41292915Sdim  // Returns the preferred base of the module, i.e. where the loader would place
42292915Sdim  // it in memory assuming there were no conflicts.
43292915Sdim  virtual uint64_t getModulePreferredBase() const = 0;
44292915Sdim};
45292915Sdim
46321369Sdim} // end namespace symbolize
47321369Sdim} // end namespace llvm
48292915Sdim
49292915Sdim#endif  // LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H
50