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

1

2

3

4

5

6

7

8

15#include

16#include

17#include

18

19using namespace llvm;

20using namespace dwarf;

21

23 unsigned RegNum) {

28 return;

29 }

30 }

31 OS << "reg" << RegNum;

32}

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

51 OS << '[';

54 OS << "unspecified";

55 break;

57 OS << "undefined";

58 break;

60 OS << "same";

61 break;

63 OS << "CFA";

65 break;

67 OS << "+";

69 break;

73 break;

75 OS << "+";

79 break;

84 }

85 break;

86 }

89 break;

90 }

92 OS << ']';

93}

94

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

118 bool First = true;

123 else

124 OS << ", ";

126 OS << '=';

128 }

129}

130

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

156 OS.indent(2 * IndentLevel);

157 if (Row.hasAddress())

158 OS << format("0x%" PRIx64 ": ", Row.getAddress());

159 OS << "CFA=";

161 if (Row.getRegisterLocations().hasLocations()) {

162 OS << ": ";

164 }

165 OS << "\n";

166}

167

173

176 unsigned IndentLevel) {

177 for (const UnwindRow &Row : Rows)

179}

180

static void printRegisterLocations(const RegisterLocations &RL, raw_ostream &OS, DIDumpOptions DumpOpts)

Print all registers + locations that are currently defined in a register locations.

Definition DWARFUnwindTablePrinter.cpp:116

static void printRegister(raw_ostream &OS, DIDumpOptions DumpOpts, unsigned RegNum)

Definition DWARFUnwindTablePrinter.cpp:22

static void printUnwindRow(const UnwindRow &Row, raw_ostream &OS, DIDumpOptions DumpOpts, unsigned IndentLevel)

Print an UnwindRow to the stream.

Definition DWARFUnwindTablePrinter.cpp:154

static void printUnwindLocation(const UnwindLocation &UL, raw_ostream &OS, DIDumpOptions DumpOpts)

Print an unwind location expression as text and use the register information if some is provided.

Definition DWARFUnwindTablePrinter.cpp:48

A class that can track all registers with locations in a UnwindRow object.

std::optional< UnwindLocation > getRegisterLocation(uint32_t RegNum) const

Return the location for the register in RegNum if there is a location.

SmallVector< uint32_t, 4 > getRegisters() const

A class that represents a location for the Call Frame Address (CFA) or a register.

uint32_t getRegister() const

int32_t getOffset() const

@ Undefined

Register is not available and can't be recovered.

@ Constant

Value is a constant value contained in "Offset": reg = Offset.

@ DWARFExpr

Register or CFA value is in or at a value found by evaluating a DWARF expression: reg = eval(dwarf_ex...

@ Same

Register value is in the register, nothing needs to be done to unwind it: reg = reg.

@ CFAPlusOffset

Register is in or at the CFA plus an offset: reg = CFA + offset reg = defef(CFA + offset)

@ Unspecified

Not specified.

@ RegPlusOffset

Register or CFA is in or at a register plus offset, optionally in an address space: reg = reg + offse...

Location getLocation() const

uint32_t getAddressSpace() const

std::optional< DWARFExpression > getDWARFExpressionBytes() const

bool getDereference() const

bool hasAddressSpace() const

A class that represents a single row in the unwind table that is decoded by parsing the DWARF Call Fr...

A class that contains all UnwindRow objects for an FDE or a single unwind row for a CIE.

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

raw_ostream & indent(unsigned NumSpaces)

indent - Insert 'NumSpaces' spaces.

Calculates the starting offsets for various sections within the .debug_names section.

LLVM_ABI void printUnwindTable(const UnwindTable &Rows, raw_ostream &OS, DIDumpOptions DumpOpts, unsigned IndentLevel=0)

Print a UnwindTable to the stream.

Definition DWARFUnwindTablePrinter.cpp:174

LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, const UnwindLocation &R)

Definition DWARFUnwindTablePrinter.cpp:95

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI void printDwarfExpression(const DWARFExpression *E, raw_ostream &OS, DIDumpOptions DumpOpts, DWARFUnit *U, bool IsEH=false)

Print a Dwarf expression/.

format_object< Ts... > format(const char *Fmt, const Ts &... Vals)

These are helper functions used to produce formatted output.

@ First

Helpers to iterate all locations in the MemoryEffectsBase class.

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

std::function< llvm::StringRef(uint64_t DwarfRegNum, bool IsEH)> GetNameForDWARFReg