Files
archived-llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
Adrian Prantl 494372f27e llvm-dwarfdump: automatically dump both regular and .dwo variant of sections
Since users typically don't really care about the .dwo / non.dwo
distinction, this patch makes it so dwarfdump --debug-<info,...> dumps
.debug_info and (if available) also .debug_info.dwo. This simplifies
the command line interface (I've removed all dwo-specific dump
options) and makes the tool friendlier to use.

Differential Revision: https://reviews.llvm.org/D37771

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313207 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13 22:09:01 +00:00

49 lines
1.2 KiB
C++

//===- 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.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
#include "llvm/Support/DataExtractor.h"
#include <memory>
#include <vector>
namespace llvm {
class FrameEntry;
class raw_ostream;
/// \brief A parsed .debug_frame or .eh_frame section
///
class DWARFDebugFrame {
// True if this is parsing an eh_frame section.
bool IsEH;
public:
DWARFDebugFrame(bool IsEH);
~DWARFDebugFrame();
/// \brief Dump the section data into the given stream.
void dump(raw_ostream &OS) const;
/// \brief Parse the section from raw data.
/// data is assumed to be pointing to the beginning of the section.
void parse(DataExtractor Data);
/// Return whether the section has any entries.
bool empty() const { return Entries.empty(); }
private:
std::vector<std::unique_ptr<FrameEntry>> Entries;
};
} // end namespace llvm
#endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H