LLVM  6.0.0svn
DWARFDebugFrame.h
Go to the documentation of this file.
1 //===- DWARFDebugFrame.h - Parsing of .debug_frame --------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
11 #define LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
12 
14 #include <memory>
15 #include <vector>
16 
17 namespace llvm {
18 
19 class FrameEntry;
20 class raw_ostream;
21 
22 /// \brief A parsed .debug_frame or .eh_frame section
23 ///
25  // True if this is parsing an eh_frame section.
26  bool IsEH;
27 
28 public:
29  DWARFDebugFrame(bool IsEH);
31 
32  /// Dump the section data into the given stream.
33  void dump(raw_ostream &OS, Optional<uint64_t> Offset) const;
34 
35  /// \brief Parse the section from raw data.
36  /// data is assumed to be pointing to the beginning of the section.
37  void parse(DataExtractor Data);
38 
39  /// Return whether the section has any entries.
40  bool empty() const { return Entries.empty(); }
41 
42  /// Return the entry at the given offset or nullptr.
43  FrameEntry *getEntryAtOffset(uint64_t Offset) const;
44 
45 private:
46  std::vector<std::unique_ptr<FrameEntry>> Entries;
47 };
48 
49 } // end namespace llvm
50 
51 #endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
A parsed .debug_frame or .eh_frame section.
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
void dump(raw_ostream &OS, Optional< uint64_t > Offset) const
Dump the section data into the given stream.
bool empty() const
Return whether the section has any entries.
void parse(DataExtractor Data)
Parse the section from raw data.
FrameEntry * getEntryAtOffset(uint64_t Offset) const
Return the entry at the given offset or nullptr.
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
Abstract frame entry defining the common interface concrete entries implement.