LLVM 22.0.0git
BTFContext.h
Go to the documentation of this file.
1//===- BTFContext.h ---------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// BTFContext interface is used by llvm-objdump tool to print source
10// code alongside disassembly.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_DEBUGINFO_BTF_BTFCONTEXT_H
15#define LLVM_DEBUGINFO_BTF_BTFCONTEXT_H
16
20
21namespace llvm {
22
23class LLVM_ABI BTFContext final : public DIContext {
24 BTFParser BTF;
25
26public:
28
29 void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override {
30 // This function is called from objdump when --dwarf=? option is set.
31 // BTF is no DWARF, so ignore this operation for now.
32 }
33
34 std::optional<DILineInfo> getLineInfoForAddress(
36 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
37
38 std::optional<DILineInfo>
39 getLineInfoForDataAddress(object::SectionedAddress Address) override;
40
41 DILineInfoTable getLineInfoForAddressRange(
43 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
44
45 DIInliningInfo getInliningInfoForAddress(
47 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
48
49 std::vector<DILocal>
50 getLocalsForAddress(object::SectionedAddress Address) override;
51
52 static std::unique_ptr<BTFContext> create(
53 const object::ObjectFile &Obj,
55};
56
57} // end namespace llvm
58
59#endif // LLVM_DEBUGINFO_BTF_BTFCONTEXT_H
#define LLVM_ABI
Definition Compiler.h:213
static fatal_error_handler_t ErrorHandler
void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override
Definition BTFContext.h:29
DIContext(DIContextKind K)
Definition DIContext.h:244
A format-neutral container for inlined code description.
Definition DIContext.h:94
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
static LLVM_ABI void defaultErrorHandler(Error Err)
Implement default handling for Error.
This class is the base class for all object file types.
Definition ObjectFile.h:231
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
This is an optimization pass for GlobalISel generic memory operations.
SmallVector< std::pair< uint64_t, DILineInfo >, 16 > DILineInfoTable
Definition DIContext.h:91
Container for dump options that control which debug information will be dumped.
Definition DIContext.h:196
Controls which fields of DILineInfo container should be filled with data.
Definition DIContext.h:146