LLVM: include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGLOC_H

10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGLOC_H

11

16#include

17

18namespace llvm {

28

29

30

32

34

35

37

38

40

41

43

44

46};

47

48

49

51public:

54

55

56

57

58

59

63

64

65

66

67

70 std::optionalobject::SectionedAddress BaseAddr,

72 unsigned Indent) const;

73

75 uint64_t Offset, std::optionalobject::SectionedAddress BaseAddr,

76 std::function<std::optionalobject::SectionedAddress(uint32_t)>

77 LookupAddr,

79

81

82protected:

84

88};

89

91public:

92

100

101private:

103

104

105

106 LocationLists Locations;

107

108public:

111

112

114 std::optional<uint64_t> Offset) const;

115

116 Error visitLocationList(

119

120protected:

124};

125

127public:

130

131 Error visitLocationList(

134

135

138

139protected:

143

144private:

146};

147

149public:

151

153

154 void log(raw_ostream &OS) const override;

158

159private:

162};

163

164}

165

166#endif

This file defines the SmallVector class.

DWARFDebugLoc(DWARFDataExtractor Data)

Definition DWARFDebugLoc.h:109

DWARFDebugLoclists(DWARFDataExtractor Data, uint16_t Version)

Definition DWARFDebugLoc.h:128

virtual void dumpRawEntry(const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const =0

DWARFLocationTable(DWARFDataExtractor Data)

Definition DWARFDebugLoc.h:52

DWARFDataExtractor Data

Definition DWARFDebugLoc.h:83

virtual Error visitLocationList(uint64_t *Offset, function_ref< bool(const DWARFLocationEntry &)> Callback) const =0

Call the user-provided callback for each entry (including the end-of-list entry) in the location list...

LLVM_ABI Error visitAbsoluteLocationList(uint64_t Offset, std::optional< object::SectionedAddress > BaseAddr, std::function< std::optional< object::SectionedAddress >(uint32_t)> LookupAddr, function_ref< bool(Expected< DWARFLocationExpression >)> Callback) const

LLVM_ABI bool dumpLocationList(uint64_t *Offset, raw_ostream &OS, std::optional< object::SectionedAddress > BaseAddr, const DWARFObject &Obj, DWARFUnit *U, DIDumpOptions DumpOpts, unsigned Indent) const

Dump the location list at the given Offset.

const DWARFDataExtractor & getData()

Definition DWARFDebugLoc.h:80

virtual ~DWARFLocationTable()=default

Base class for user error types.

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...

std::error_code convertToErrorCode() const override

Convert this error to a std::error_code.

Definition DWARFDebugLoc.h:155

static char ID

Definition DWARFDebugLoc.h:150

ResolverError(uint32_t Index, dwarf::LoclistEntries Kind)

Definition DWARFDebugLoc.h:152

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

An efficient, type-erasing, non-owning reference to a callable.

This class implements an extremely fast bulk output stream that can only output to a stream.

LoclistEntries

DWARF v5 loc list entry encoding values.

Definition DWARFDebugLoc.h:25

This is an optimization pass for GlobalISel generic memory operations.

void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)

FunctionAddr VTableAddr uintptr_t uintptr_t Version

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

Implement std::hash so that hash_code can be used in STL containers.

Container for dump options that control which debug information will be dumped.

A list of locations that contain one variable.

Definition DWARFDebugLoc.h:93

uint64_t Offset

The beginning offset where this location list is stored in the debug_loc section.

Definition DWARFDebugLoc.h:96

SmallVector< DWARFLocationEntry, 2 > Entries

All the locations in which the variable is stored.

Definition DWARFDebugLoc.h:98

A single location within a location list.

Definition DWARFDebugLoc.h:31

SmallVector< uint8_t, 4 > Loc

The location expression itself (if applicable).

Definition DWARFDebugLoc.h:45

uint8_t Kind

The entry kind (DW_LLE_***).

Definition DWARFDebugLoc.h:33

uint64_t Value1

The second value of the location entry (if applicable).

Definition DWARFDebugLoc.h:39

uint64_t SectionIndex

The index of the section this entry is relative to (if applicable).

Definition DWARFDebugLoc.h:42

uint64_t Value0

The first value of the location entry (if applicable).

Definition DWARFDebugLoc.h:36

Represents a single DWARF expression, whose value is location-dependent.