LLVM 20.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
19
20namespace llvm {
21
22class BTFContext final : public DIContext {
23 BTFParser BTF;
24
25public:
27
28 void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override {
29 // This function is called from objdump when --dwarf=? option is set.
30 // BTF is no DWARF, so ignore this operation for now.
31 }
32
35 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
36
39
42 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
43
46 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
47
48 std::vector<DILocal>
50
51 static std::unique_ptr<BTFContext> create(
52 const object::ObjectFile &Obj,
54};
55
56} // end namespace llvm
57
58#endif // LLVM_DEBUGINFO_BTF_BTFCONTEXT_H
uint64_t Size
static fatal_error_handler_t ErrorHandler
raw_pwrite_stream & OS
static std::unique_ptr< BTFContext > create(const object::ObjectFile &Obj, std::function< void(Error)> ErrorHandler=WithColor::defaultErrorHandler)
Definition: BTFContext.cpp:63
void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override
Definition: BTFContext.h:28
DILineInfo getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: BTFContext.cpp:23
std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address) override
Definition: BTFContext.cpp:57
DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: BTFContext.cpp:43
DILineInfo getLineInfoForDataAddress(object::SectionedAddress Address) override
Definition: BTFContext.cpp:37
DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Definition: BTFContext.cpp:51
A format-neutral container for inlined code description.
Definition: DIContext.h:94
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1196
static void defaultErrorHandler(Error Err)
Implement default handling for Error.
Definition: WithColor.cpp:158
This class is the base class for all object file types.
Definition: ObjectFile.h:229
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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
A format-neutral container for source line information.
Definition: DIContext.h:32