@@ -32,8 +32,22 @@ static void printRegister(raw_ostream &OS, DIDumpOptions DumpOpts,
3232 OS << " reg" << RegNum;
3333}
3434
35- void llvm::dwarf::printUnwindLocation (const UnwindLocation &UL, raw_ostream &OS,
36- DIDumpOptions DumpOpts) {
35+ // / Print an unwind location expression as text and use the register information
36+ // / if some is provided.
37+ // /
38+ // / \param R the unwind location to print.
39+ // /
40+ // / \param OS the stream to use for output.
41+ // /
42+ // / \param MRI register information that helps emit register names insteead
43+ // / of raw register numbers.
44+ // /
45+ // / \param IsEH true if the DWARF Call Frame Information is from .eh_frame
46+ // / instead of from .debug_frame. This is needed for register number
47+ // / conversion because some register numbers differ between the two sections
48+ // / for certain architectures like x86.
49+ static void printUnwindLocation (const UnwindLocation &UL, raw_ostream &OS,
50+ DIDumpOptions DumpOpts) {
3751 if (UL.getDereference ())
3852 OS << ' [' ;
3953 switch (UL.getLocation ()) {
@@ -86,9 +100,22 @@ raw_ostream &llvm::dwarf::operator<<(raw_ostream &OS,
86100 return OS;
87101}
88102
89- void llvm::dwarf::printRegisterLocations (const RegisterLocations &RL,
90- raw_ostream &OS,
91- DIDumpOptions DumpOpts) {
103+ // / Print all registers + locations that are currently defined in a register
104+ // / locations.
105+ // /
106+ // / \param RL the register locations to print.
107+ // /
108+ // / \param OS the stream to use for output.
109+ // /
110+ // / \param MRI register information that helps emit register names insteead
111+ // / of raw register numbers.
112+ // /
113+ // / \param IsEH true if the DWARF Call Frame Information is from .eh_frame
114+ // / instead of from .debug_frame. This is needed for register number
115+ // / conversion because some register numbers differ between the two sections
116+ // / for certain architectures like x86.
117+ static void printRegisterLocations (const RegisterLocations &RL, raw_ostream &OS,
118+ DIDumpOptions DumpOpts) {
92119 bool First = true ;
93120 for (uint32_t Reg : RL.getRegisters ()) {
94121 auto Loc = *RL.getRegisterLocation (Reg);
@@ -109,8 +136,24 @@ raw_ostream &llvm::dwarf::operator<<(raw_ostream &OS,
109136 return OS;
110137}
111138
112- void llvm::dwarf::printUnwindRow (const UnwindRow &Row, raw_ostream &OS,
113- DIDumpOptions DumpOpts, unsigned IndentLevel) {
139+ // / Print an UnwindRow to the stream.
140+ // /
141+ // / \param Row the UnwindRow to print.
142+ // /
143+ // / \param OS the stream to use for output.
144+ // /
145+ // / \param MRI register information that helps emit register names insteead
146+ // / of raw register numbers.
147+ // /
148+ // / \param IsEH true if the DWARF Call Frame Information is from .eh_frame
149+ // / instead of from .debug_frame. This is needed for register number
150+ // / conversion because some register numbers differ between the two sections
151+ // / for certain architectures like x86.
152+ // /
153+ // / \param IndentLevel specify the indent level as an integer. The UnwindRow
154+ // / will be output to the stream preceded by 2 * IndentLevel number of spaces.
155+ static void printUnwindRow (const UnwindRow &Row, raw_ostream &OS,
156+ DIDumpOptions DumpOpts, unsigned IndentLevel) {
114157 OS.indent (2 * IndentLevel);
115158 if (Row.hasAddress ())
116159 OS << format (" 0x%" PRIx64 " : " , Row.getAddress ());
0 commit comments