LLVM
22.0.0git
include
llvm
DebugInfo
BTF
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
17
#include "
llvm/DebugInfo/BTF/BTFParser.h
"
18
#include "
llvm/DebugInfo/DIContext.h
"
19
#include "
llvm/Support/Compiler.h
"
20
21
namespace
llvm
{
22
23
class
LLVM_ABI
BTFContext
final :
public
DIContext
{
24
BTFParser
BTF;
25
26
public
:
27
BTFContext
() :
DIContext
(
CK_BTF
) {}
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(
35
object::SectionedAddress
Address
,
36
DILineInfoSpecifier
Specifier =
DILineInfoSpecifier
())
override
;
37
38
std::optional<DILineInfo>
39
getLineInfoForDataAddress(
object::SectionedAddress
Address
)
override
;
40
41
DILineInfoTable
getLineInfoForAddressRange(
42
object::SectionedAddress
Address
,
uint64_t
Size
,
43
DILineInfoSpecifier
Specifier =
DILineInfoSpecifier
())
override
;
44
45
DIInliningInfo
getInliningInfoForAddress(
46
object::SectionedAddress
Address
,
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,
54
std::function<
void
(
Error
)>
ErrorHandler
=
WithColor::defaultErrorHandler
);
55
};
56
57
}
// end namespace llvm
58
59
#endif
// LLVM_DEBUGINFO_BTF_BTFCONTEXT_H
BTFParser.h
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
DIContext.h
ErrorHandler
static fatal_error_handler_t ErrorHandler
Definition
ErrorHandling.cpp:44
InlinePriorityMode::Size
@ Size
Definition
InlineOrder.cpp:25
llvm::BTFContext::dump
void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override
Definition
BTFContext.h:29
llvm::BTFContext::BTFContext
BTFContext()
Definition
BTFContext.h:27
llvm::BTFParser
Definition
BTFParser.h:36
llvm::DIContext::CK_BTF
@ CK_BTF
Definition
DIContext.h:242
llvm::DIContext::DIContext
DIContext(DIContextKind K)
Definition
DIContext.h:244
llvm::DIInliningInfo
A format-neutral container for inlined code description.
Definition
DIContext.h:94
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition
Error.h:159
llvm::WithColor::defaultErrorHandler
static LLVM_ABI void defaultErrorHandler(Error Err)
Implement default handling for Error.
Definition
WithColor.cpp:158
llvm::object::ObjectFile
This class is the base class for all object file types.
Definition
ObjectFile.h:231
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition
raw_ostream.h:53
uint64_t
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
llvm::DILineInfoTable
SmallVector< std::pair< uint64_t, DILineInfo >, 16 > DILineInfoTable
Definition
DIContext.h:91
llvm::CaptureComponents::Address
@ Address
Definition
ModRef.h:308
llvm::DIDumpOptions
Container for dump options that control which debug information will be dumped.
Definition
DIContext.h:196
llvm::DILineInfoSpecifier
Controls which fields of DILineInfo container should be filled with data.
Definition
DIContext.h:146
llvm::object::SectionedAddress
Definition
ObjectFile.h:147
Generated on
for LLVM by
1.14.0