2013-02-05 23:30:58 +00:00
|
|
|
//===-- DWARFDebugFrame.h - Parsing of .debug_frame -------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "DWARFDebugFrame.h"
|
|
|
|
#include "llvm/ADT/SmallString.h"
|
|
|
|
#include "llvm/Support/DataTypes.h"
|
|
|
|
#include "llvm/Support/Dwarf.h"
|
2014-01-07 11:48:04 +00:00
|
|
|
#include "llvm/Support/ErrorHandling.h"
|
2013-02-05 23:30:58 +00:00
|
|
|
#include "llvm/Support/Format.h"
|
2013-02-21 22:53:19 +00:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2013-02-05 23:30:58 +00:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
using namespace dwarf;
|
|
|
|
|
|
|
|
|
2013-02-06 16:20:31 +00:00
|
|
|
/// \brief Abstract frame entry defining the common interface concrete
|
|
|
|
/// entries implement.
|
2013-02-05 23:30:58 +00:00
|
|
|
class llvm::FrameEntry {
|
|
|
|
public:
|
|
|
|
enum FrameKind {FK_CIE, FK_FDE};
|
|
|
|
FrameEntry(FrameKind K, DataExtractor D, uint64_t Offset, uint64_t Length)
|
2013-02-06 00:20:38 +00:00
|
|
|
: Kind(K), Data(D), Offset(Offset), Length(Length) {}
|
2013-02-05 23:30:58 +00:00
|
|
|
|
2013-02-06 03:08:02 +00:00
|
|
|
virtual ~FrameEntry() {
|
|
|
|
}
|
|
|
|
|
2013-02-05 23:30:58 +00:00
|
|
|
FrameKind getKind() const { return Kind; }
|
2013-02-21 22:53:19 +00:00
|
|
|
virtual uint64_t getOffset() const { return Offset; }
|
2013-02-05 23:30:58 +00:00
|
|
|
|
2013-02-21 22:53:19 +00:00
|
|
|
/// \brief Parse and store a sequence of CFI instructions from our data
|
2013-02-22 00:50:48 +00:00
|
|
|
/// stream, starting at *Offset and ending at EndOffset. If everything
|
|
|
|
/// goes well, *Offset should be equal to EndOffset when this method
|
2013-02-21 22:53:19 +00:00
|
|
|
/// returns. Otherwise, an error occurred.
|
2013-02-22 00:50:48 +00:00
|
|
|
virtual void parseInstructions(uint32_t *Offset, uint32_t EndOffset);
|
2013-02-21 22:53:19 +00:00
|
|
|
|
|
|
|
/// \brief Dump the entry header to the given output stream.
|
2013-02-05 23:30:58 +00:00
|
|
|
virtual void dumpHeader(raw_ostream &OS) const = 0;
|
2013-02-06 00:20:38 +00:00
|
|
|
|
2013-02-21 22:53:19 +00:00
|
|
|
/// \brief Dump the entry's instructions to the given output stream.
|
|
|
|
virtual void dumpInstructions(raw_ostream &OS) const;
|
|
|
|
|
2013-02-05 23:30:58 +00:00
|
|
|
protected:
|
|
|
|
const FrameKind Kind;
|
2013-02-06 00:20:38 +00:00
|
|
|
|
|
|
|
/// \brief The data stream holding the section from which the entry was
|
|
|
|
/// parsed.
|
2013-02-05 23:30:58 +00:00
|
|
|
DataExtractor Data;
|
2013-02-06 00:20:38 +00:00
|
|
|
|
|
|
|
/// \brief Offset of this entry in the section.
|
2013-02-05 23:30:58 +00:00
|
|
|
uint64_t Offset;
|
2013-02-06 00:20:38 +00:00
|
|
|
|
|
|
|
/// \brief Entry length as specified in DWARF.
|
2013-02-05 23:30:58 +00:00
|
|
|
uint64_t Length;
|
2013-02-21 22:53:19 +00:00
|
|
|
|
|
|
|
/// An entry may contain CFI instructions. An instruction consists of an
|
|
|
|
/// opcode and an optional sequence of operands.
|
|
|
|
typedef std::vector<uint64_t> Operands;
|
|
|
|
struct Instruction {
|
|
|
|
Instruction(uint8_t Opcode)
|
|
|
|
: Opcode(Opcode)
|
|
|
|
{}
|
|
|
|
|
|
|
|
uint8_t Opcode;
|
|
|
|
Operands Ops;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<Instruction> Instructions;
|
|
|
|
|
|
|
|
/// Convenience methods to add a new instruction with the given opcode and
|
|
|
|
/// operands to the Instructions vector.
|
|
|
|
void addInstruction(uint8_t Opcode) {
|
|
|
|
Instructions.push_back(Instruction(Opcode));
|
|
|
|
}
|
|
|
|
|
|
|
|
void addInstruction(uint8_t Opcode, uint64_t Operand1) {
|
|
|
|
Instructions.push_back(Instruction(Opcode));
|
|
|
|
Instructions.back().Ops.push_back(Operand1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void addInstruction(uint8_t Opcode, uint64_t Operand1, uint64_t Operand2) {
|
|
|
|
Instructions.push_back(Instruction(Opcode));
|
|
|
|
Instructions.back().Ops.push_back(Operand1);
|
|
|
|
Instructions.back().Ops.push_back(Operand2);
|
|
|
|
}
|
2013-02-05 23:30:58 +00:00
|
|
|
};
|
|
|
|
|
2013-02-21 22:53:19 +00:00
|
|
|
|
|
|
|
// See DWARF standard v3, section 7.23
|
|
|
|
const uint8_t DWARF_CFI_PRIMARY_OPCODE_MASK = 0xc0;
|
|
|
|
const uint8_t DWARF_CFI_PRIMARY_OPERAND_MASK = 0x3f;
|
|
|
|
|
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
void FrameEntry::parseInstructions(uint32_t *Offset, uint32_t EndOffset) {
|
|
|
|
while (*Offset < EndOffset) {
|
|
|
|
uint8_t Opcode = Data.getU8(Offset);
|
2013-02-21 22:53:19 +00:00
|
|
|
// Some instructions have a primary opcode encoded in the top bits.
|
|
|
|
uint8_t Primary = Opcode & DWARF_CFI_PRIMARY_OPCODE_MASK;
|
|
|
|
|
|
|
|
if (Primary) {
|
|
|
|
// If it's a primary opcode, the first operand is encoded in the bottom
|
|
|
|
// bits of the opcode itself.
|
|
|
|
uint64_t Op1 = Opcode & DWARF_CFI_PRIMARY_OPERAND_MASK;
|
|
|
|
switch (Primary) {
|
|
|
|
default: llvm_unreachable("Impossible primary CFI opcode");
|
|
|
|
case DW_CFA_advance_loc:
|
|
|
|
case DW_CFA_restore:
|
|
|
|
addInstruction(Primary, Op1);
|
|
|
|
break;
|
|
|
|
case DW_CFA_offset:
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Primary, Op1, Data.getULEB128(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// Extended opcode - its value is Opcode itself.
|
|
|
|
switch (Opcode) {
|
|
|
|
default: llvm_unreachable("Invalid extended CFI opcode");
|
|
|
|
case DW_CFA_nop:
|
|
|
|
case DW_CFA_remember_state:
|
|
|
|
case DW_CFA_restore_state:
|
|
|
|
// No operands
|
|
|
|
addInstruction(Opcode);
|
|
|
|
break;
|
|
|
|
case DW_CFA_set_loc:
|
|
|
|
// Operands: Address
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getAddress(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_advance_loc1:
|
|
|
|
// Operands: 1-byte delta
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getU8(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_advance_loc2:
|
|
|
|
// Operands: 2-byte delta
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getU16(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_advance_loc4:
|
|
|
|
// Operands: 4-byte delta
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getU32(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_restore_extended:
|
|
|
|
case DW_CFA_undefined:
|
|
|
|
case DW_CFA_same_value:
|
|
|
|
case DW_CFA_def_cfa_register:
|
|
|
|
case DW_CFA_def_cfa_offset:
|
|
|
|
// Operands: ULEB128
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getULEB128(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_def_cfa_offset_sf:
|
|
|
|
// Operands: SLEB128
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getSLEB128(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_offset_extended:
|
|
|
|
case DW_CFA_register:
|
|
|
|
case DW_CFA_def_cfa:
|
|
|
|
case DW_CFA_val_offset:
|
|
|
|
// Operands: ULEB128, ULEB128
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getULEB128(Offset),
|
|
|
|
Data.getULEB128(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_offset_extended_sf:
|
|
|
|
case DW_CFA_def_cfa_sf:
|
|
|
|
case DW_CFA_val_offset_sf:
|
|
|
|
// Operands: ULEB128, SLEB128
|
2013-02-22 00:50:48 +00:00
|
|
|
addInstruction(Opcode, Data.getULEB128(Offset),
|
|
|
|
Data.getSLEB128(Offset));
|
2013-02-21 22:53:19 +00:00
|
|
|
break;
|
|
|
|
case DW_CFA_def_cfa_expression:
|
|
|
|
case DW_CFA_expression:
|
|
|
|
case DW_CFA_val_expression:
|
|
|
|
// TODO: implement this
|
|
|
|
report_fatal_error("Values with expressions not implemented yet!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FrameEntry::dumpInstructions(raw_ostream &OS) const {
|
|
|
|
// TODO: at the moment only instruction names are dumped. Expand this to
|
|
|
|
// dump operands as well.
|
|
|
|
for (std::vector<Instruction>::const_iterator I = Instructions.begin(),
|
|
|
|
E = Instructions.end();
|
|
|
|
I != E; ++I) {
|
|
|
|
uint8_t Opcode = I->Opcode;
|
|
|
|
if (Opcode & DWARF_CFI_PRIMARY_OPCODE_MASK)
|
|
|
|
Opcode &= DWARF_CFI_PRIMARY_OPCODE_MASK;
|
|
|
|
OS << " " << CallFrameString(Opcode) << ":\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-15 12:30:38 +00:00
|
|
|
namespace {
|
2013-02-06 16:20:31 +00:00
|
|
|
/// \brief DWARF Common Information Entry (CIE)
|
2013-02-05 23:30:58 +00:00
|
|
|
class CIE : public FrameEntry {
|
|
|
|
public:
|
|
|
|
// CIEs (and FDEs) are simply container classes, so the only sensible way to
|
|
|
|
// create them is by providing the full parsed contents in the constructor.
|
|
|
|
CIE(DataExtractor D, uint64_t Offset, uint64_t Length, uint8_t Version,
|
|
|
|
SmallString<8> Augmentation, uint64_t CodeAlignmentFactor,
|
|
|
|
int64_t DataAlignmentFactor, uint64_t ReturnAddressRegister)
|
|
|
|
: FrameEntry(FK_CIE, D, Offset, Length), Version(Version),
|
|
|
|
Augmentation(Augmentation), CodeAlignmentFactor(CodeAlignmentFactor),
|
|
|
|
DataAlignmentFactor(DataAlignmentFactor),
|
2013-02-06 00:20:38 +00:00
|
|
|
ReturnAddressRegister(ReturnAddressRegister) {}
|
2013-02-05 23:30:58 +00:00
|
|
|
|
2013-02-06 03:08:02 +00:00
|
|
|
~CIE() {
|
|
|
|
}
|
|
|
|
|
2013-02-05 23:30:58 +00:00
|
|
|
void dumpHeader(raw_ostream &OS) const {
|
2013-02-07 02:02:27 +00:00
|
|
|
OS << format("%08x %08x %08x CIE",
|
|
|
|
(uint32_t)Offset, (uint32_t)Length, DW_CIE_ID)
|
|
|
|
<< "\n";
|
2013-02-05 23:30:58 +00:00
|
|
|
OS << format(" Version: %d\n", Version);
|
|
|
|
OS << " Augmentation: \"" << Augmentation << "\"\n";
|
2013-02-21 22:53:19 +00:00
|
|
|
OS << format(" Code alignment factor: %u\n",
|
|
|
|
(uint32_t)CodeAlignmentFactor);
|
|
|
|
OS << format(" Data alignment factor: %d\n",
|
|
|
|
(int32_t)DataAlignmentFactor);
|
|
|
|
OS << format(" Return address column: %d\n",
|
|
|
|
(int32_t)ReturnAddressRegister);
|
2013-02-05 23:30:58 +00:00
|
|
|
OS << "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool classof(const FrameEntry *FE) {
|
|
|
|
return FE->getKind() == FK_CIE;
|
|
|
|
}
|
2013-02-06 00:20:38 +00:00
|
|
|
|
2013-02-05 23:30:58 +00:00
|
|
|
private:
|
2013-02-06 00:20:38 +00:00
|
|
|
/// The following fields are defined in section 6.4.1 of the DWARF standard v3
|
2013-02-05 23:30:58 +00:00
|
|
|
uint8_t Version;
|
|
|
|
SmallString<8> Augmentation;
|
|
|
|
uint64_t CodeAlignmentFactor;
|
|
|
|
int64_t DataAlignmentFactor;
|
|
|
|
uint64_t ReturnAddressRegister;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-02-06 16:20:31 +00:00
|
|
|
/// \brief DWARF Frame Description Entry (FDE)
|
2013-02-05 23:30:58 +00:00
|
|
|
class FDE : public FrameEntry {
|
|
|
|
public:
|
|
|
|
// Each FDE has a CIE it's "linked to". Our FDE contains is constructed with
|
|
|
|
// an offset to the CIE (provided by parsing the FDE header). The CIE itself
|
|
|
|
// is obtained lazily once it's actually required.
|
2013-02-06 00:20:38 +00:00
|
|
|
FDE(DataExtractor D, uint64_t Offset, uint64_t Length,
|
|
|
|
int64_t LinkedCIEOffset, uint64_t InitialLocation, uint64_t AddressRange)
|
2013-02-05 23:30:58 +00:00
|
|
|
: FrameEntry(FK_FDE, D, Offset, Length), LinkedCIEOffset(LinkedCIEOffset),
|
|
|
|
InitialLocation(InitialLocation), AddressRange(AddressRange),
|
2013-02-06 00:20:38 +00:00
|
|
|
LinkedCIE(NULL) {}
|
2013-02-05 23:30:58 +00:00
|
|
|
|
2013-02-06 03:08:02 +00:00
|
|
|
~FDE() {
|
|
|
|
}
|
|
|
|
|
2013-02-05 23:30:58 +00:00
|
|
|
void dumpHeader(raw_ostream &OS) const {
|
2013-02-07 02:02:27 +00:00
|
|
|
OS << format("%08x %08x %08x FDE ",
|
2013-02-07 14:54:42 +00:00
|
|
|
(uint32_t)Offset, (uint32_t)Length, (int32_t)LinkedCIEOffset);
|
2013-02-05 23:30:58 +00:00
|
|
|
OS << format("cie=%08x pc=%08x...%08x\n",
|
2013-02-07 14:54:42 +00:00
|
|
|
(int32_t)LinkedCIEOffset,
|
2013-02-07 10:57:42 +00:00
|
|
|
(uint32_t)InitialLocation,
|
|
|
|
(uint32_t)InitialLocation + (uint32_t)AddressRange);
|
2013-02-06 05:37:46 +00:00
|
|
|
if (LinkedCIE) {
|
|
|
|
OS << format("%p\n", LinkedCIE);
|
|
|
|
}
|
2013-02-05 23:30:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool classof(const FrameEntry *FE) {
|
|
|
|
return FE->getKind() == FK_FDE;
|
|
|
|
}
|
|
|
|
private:
|
2013-02-06 00:20:38 +00:00
|
|
|
|
|
|
|
/// The following fields are defined in section 6.4.1 of the DWARF standard v3
|
2013-02-05 23:30:58 +00:00
|
|
|
uint64_t LinkedCIEOffset;
|
|
|
|
uint64_t InitialLocation;
|
|
|
|
uint64_t AddressRange;
|
|
|
|
CIE *LinkedCIE;
|
|
|
|
};
|
2013-02-15 12:30:38 +00:00
|
|
|
} // end anonymous namespace
|
2013-02-05 23:30:58 +00:00
|
|
|
|
|
|
|
|
2013-02-06 00:20:38 +00:00
|
|
|
DWARFDebugFrame::DWARFDebugFrame() {
|
2013-02-05 23:30:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-02-06 00:20:38 +00:00
|
|
|
DWARFDebugFrame::~DWARFDebugFrame() {
|
2013-02-05 23:30:58 +00:00
|
|
|
for (EntryVector::iterator I = Entries.begin(), E = Entries.end();
|
|
|
|
I != E; ++I) {
|
|
|
|
delete *I;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void LLVM_ATTRIBUTE_UNUSED dumpDataAux(DataExtractor Data,
|
|
|
|
uint32_t Offset, int Length) {
|
|
|
|
errs() << "DUMP: ";
|
|
|
|
for (int i = 0; i < Length; ++i) {
|
|
|
|
uint8_t c = Data.getU8(&Offset);
|
|
|
|
errs().write_hex(c); errs() << " ";
|
|
|
|
}
|
|
|
|
errs() << "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DWARFDebugFrame::parse(DataExtractor Data) {
|
|
|
|
uint32_t Offset = 0;
|
|
|
|
|
|
|
|
while (Data.isValidOffset(Offset)) {
|
|
|
|
uint32_t StartOffset = Offset;
|
|
|
|
|
|
|
|
bool IsDWARF64 = false;
|
|
|
|
uint64_t Length = Data.getU32(&Offset);
|
|
|
|
uint64_t Id;
|
|
|
|
|
|
|
|
if (Length == UINT32_MAX) {
|
|
|
|
// DWARF-64 is distinguished by the first 32 bits of the initial length
|
|
|
|
// field being 0xffffffff. Then, the next 64 bits are the actual entry
|
|
|
|
// length.
|
|
|
|
IsDWARF64 = true;
|
|
|
|
Length = Data.getU64(&Offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
// At this point, Offset points to the next field after Length.
|
|
|
|
// Length is the structure size excluding itself. Compute an offset one
|
|
|
|
// past the end of the structure (needed to know how many instructions to
|
|
|
|
// read).
|
|
|
|
// TODO: For honest DWARF64 support, DataExtractor will have to treat
|
|
|
|
// offset_ptr as uint64_t*
|
|
|
|
uint32_t EndStructureOffset = Offset + static_cast<uint32_t>(Length);
|
|
|
|
|
|
|
|
// The Id field's size depends on the DWARF format
|
|
|
|
Id = Data.getUnsigned(&Offset, IsDWARF64 ? 8 : 4);
|
|
|
|
bool IsCIE = ((IsDWARF64 && Id == DW64_CIE_ID) || Id == DW_CIE_ID);
|
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
FrameEntry *Entry = 0;
|
2013-02-05 23:30:58 +00:00
|
|
|
if (IsCIE) {
|
|
|
|
// Note: this is specifically DWARFv3 CIE header structure. It was
|
2013-02-22 00:50:48 +00:00
|
|
|
// changed in DWARFv4. We currently don't support reading DWARFv4
|
|
|
|
// here because LLVM itself does not emit it (and LLDB doesn't
|
|
|
|
// support it either).
|
2013-02-05 23:30:58 +00:00
|
|
|
uint8_t Version = Data.getU8(&Offset);
|
|
|
|
const char *Augmentation = Data.getCStr(&Offset);
|
|
|
|
uint64_t CodeAlignmentFactor = Data.getULEB128(&Offset);
|
|
|
|
int64_t DataAlignmentFactor = Data.getSLEB128(&Offset);
|
|
|
|
uint64_t ReturnAddressRegister = Data.getULEB128(&Offset);
|
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
Entry = new CIE(Data, StartOffset, Length, Version,
|
|
|
|
StringRef(Augmentation), CodeAlignmentFactor,
|
|
|
|
DataAlignmentFactor, ReturnAddressRegister);
|
2013-02-05 23:30:58 +00:00
|
|
|
} else {
|
|
|
|
// FDE
|
|
|
|
uint64_t CIEPointer = Id;
|
|
|
|
uint64_t InitialLocation = Data.getAddress(&Offset);
|
|
|
|
uint64_t AddressRange = Data.getAddress(&Offset);
|
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
Entry = new FDE(Data, StartOffset, Length, CIEPointer,
|
|
|
|
InitialLocation, AddressRange);
|
2013-02-05 23:30:58 +00:00
|
|
|
}
|
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
assert(Entry && "Expected Entry to be populated with CIE or FDE");
|
|
|
|
Entry->parseInstructions(&Offset, EndStructureOffset);
|
2013-02-21 22:53:19 +00:00
|
|
|
|
2013-02-22 00:50:48 +00:00
|
|
|
if (Offset == EndStructureOffset) {
|
|
|
|
// Entry instrucitons parsed successfully.
|
|
|
|
Entries.push_back(Entry);
|
|
|
|
} else {
|
2013-02-21 22:53:19 +00:00
|
|
|
std::string Str;
|
|
|
|
raw_string_ostream OS(Str);
|
|
|
|
OS << format("Parsing entry instructions at %lx failed",
|
2013-02-22 00:50:48 +00:00
|
|
|
Entry->getOffset());
|
2013-02-21 22:53:19 +00:00
|
|
|
report_fatal_error(Str);
|
|
|
|
}
|
2013-02-05 23:30:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DWARFDebugFrame::dump(raw_ostream &OS) const {
|
|
|
|
OS << "\n";
|
|
|
|
for (EntryVector::const_iterator I = Entries.begin(), E = Entries.end();
|
|
|
|
I != E; ++I) {
|
2013-02-21 22:53:19 +00:00
|
|
|
FrameEntry *Entry = *I;
|
|
|
|
Entry->dumpHeader(OS);
|
|
|
|
Entry->dumpInstructions(OS);
|
|
|
|
OS << "\n";
|
2013-02-05 23:30:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|