LLVM: lib/DebugInfo/DWARF/DWARFDataExtractor.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

13

14using namespace llvm;

15

16std::pair<uint64_t, dwarf::DwarfFormat>

19 if (Err && *Err)

21

30 if (Err)

33 "unsupported reserved unit length of value 0x%8.8" PRIx64, Length);

35 }

36

37 if (C) {

38 *Off = C.tell();

40 }

41 if (Err)

42 *Err = C.takeError();

43 else

46}

47

50 Error *Err) const {

51 if (SecNdx)

53 if (!Section)

55

57 std::optional E = Obj->find(*Section, *Off);

59 if (!E || (Err && *Err))

60 return LocData;

61 if (SecNdx)

62 *SecNdx = E->SectionIndex;

63

66 if (E->Reloc2)

68 return R;

69}

70

71std::optional<uint64_t>

75 return std::nullopt;

76

79

80 switch (Encoding & 0x0F) {

83 case 2:

84 case 4:

85 case 8:

87 break;

88 default:

89 return std::nullopt;

90 }

91 break;

94 break;

97 break;

100 break;

103 break;

106 break;

109 break;

112 break;

115 break;

116 default:

117 return std::nullopt;

118 }

119

120 switch (Encoding & 0x70) {

122

123 break;

125 Result += PCRelOffset;

126 break;

131 default:

133 return std::nullopt;

134 }

135

136 return Result;

137}

virtual std::optional< RelocAddrEntry > find(const DWARFSection &Sec, uint64_t Pos) const =0

Helper for Errors used as out-parameters.

Lightweight error class with error context and mandatory checking.

@ C

The default llvm calling convention, compatible with C.

DwarfFormat

Constants that define the DWARF format as 32 or 64 bit.

@ DW_LENGTH_lo_reserved

Special values for an initial length field.

@ DW_LENGTH_DWARF64

Indicator of 64-bit DWARF format.

uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)

This is an optimization pass for GlobalISel generic memory operations.

Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)

Create formatted StringError object.

void cantFail(Error Err, const char *Msg=nullptr)

Report a fatal error if Err is a failure value.

void consumeError(Error Err)

Consume a Error without doing anything.

static const uint64_t UndefSection