LLVM 22.0.0git
Functions
DWARFUnwindTablePrinter.cpp File Reference
#include "llvm/DebugInfo/DWARF/DWARFUnwindTablePrinter.h"
#include "llvm/DebugInfo/DIContext.h"
#include "llvm/DebugInfo/DWARF/DWARFExpressionPrinter.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <optional>

Go to the source code of this file.

Functions

static void printRegister (raw_ostream &OS, DIDumpOptions DumpOpts, unsigned RegNum)
 
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.
 
static void printRegisterLocations (const RegisterLocations &RL, raw_ostream &OS, DIDumpOptions DumpOpts)
 Print all registers + locations that are currently defined in a register locations.
 
static void printUnwindRow (const UnwindRow &Row, raw_ostream &OS, DIDumpOptions DumpOpts, unsigned IndentLevel)
 Print an UnwindRow to the stream.
 

Function Documentation

◆ printRegister()

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

◆ printRegisterLocations()

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

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

Parameters
RLthe register locations to print.
OSthe stream to use for output.
MRIregister information that helps emit register names insteead of raw register numbers.
IsEHtrue if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.

Definition at line 117 of file DWARFUnwindTablePrinter.cpp.

References llvm::First, llvm::dwarf::RegisterLocations::getRegisterLocation(), llvm::dwarf::RegisterLocations::getRegisters(), OS, printRegister(), and printUnwindLocation().

Referenced by llvm::dwarf::operator<<(), and printUnwindRow().

◆ printUnwindLocation()

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

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

Parameters
Rthe unwind location to print.
OSthe stream to use for output.
MRIregister information that helps emit register names insteead of raw register numbers.
IsEHtrue if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.

Definition at line 49 of file DWARFUnwindTablePrinter.cpp.

References llvm::dwarf::UnwindLocation::CFAPlusOffset, llvm::dwarf::UnwindLocation::Constant, llvm::dwarf::UnwindLocation::DWARFExpr, llvm::dwarf::UnwindLocation::getAddressSpace(), llvm::dwarf::UnwindLocation::getDereference(), llvm::dwarf::UnwindLocation::getDWARFExpressionBytes(), llvm::dwarf::UnwindLocation::getLocation(), llvm::dwarf::UnwindLocation::getOffset(), llvm::dwarf::UnwindLocation::getRegister(), llvm::dwarf::UnwindLocation::hasAddressSpace(), OS, llvm::printDwarfExpression(), printRegister(), llvm::dwarf::UnwindLocation::RegPlusOffset, llvm::dwarf::UnwindLocation::Same, llvm::dwarf::UnwindLocation::Undefined, and llvm::dwarf::UnwindLocation::Unspecified.

Referenced by llvm::dwarf::operator<<(), printRegisterLocations(), and printUnwindRow().

◆ printUnwindRow()

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

Print an UnwindRow to the stream.

Parameters
Rowthe UnwindRow to print.
OSthe stream to use for output.
MRIregister information that helps emit register names insteead of raw register numbers.
IsEHtrue if the DWARF Call Frame Information is from .eh_frame instead of from .debug_frame. This is needed for register number conversion because some register numbers differ between the two sections for certain architectures like x86.
IndentLevelspecify the indent level as an integer. The UnwindRow will be output to the stream preceded by 2 * IndentLevel number of spaces.

Definition at line 155 of file DWARFUnwindTablePrinter.cpp.

References llvm::format(), llvm::raw_ostream::indent(), OS, printRegisterLocations(), and printUnwindLocation().

Referenced by llvm::dwarf::operator<<(), and llvm::dwarf::printUnwindTable().