blob: bd4ef45e4cfe919623be1b713c3d8a4165f6bfe2 [file] [log] [blame]
Eli Bendersky60bdc5b2013-02-05 23:30:58 +00001//===-- 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_DWARFDEBUGFRAME_H
11#define LLVM_DEBUGINFO_DWARFDEBUGFRAME_H
12
13#include "llvm/Support/DataExtractor.h"
14#include "llvm/Support/raw_ostream.h"
Stephen Hinesdce4a402014-05-29 02:49:00 -070015#include <memory>
Eli Bendersky60bdc5b2013-02-05 23:30:58 +000016#include <vector>
17
Eli Bendersky60bdc5b2013-02-05 23:30:58 +000018namespace llvm {
19
20class FrameEntry;
21
Eli Bendersky60bdc5b2013-02-05 23:30:58 +000022/// \brief A parsed .debug_frame section
23///
24class DWARFDebugFrame {
25public:
26 DWARFDebugFrame();
27 ~DWARFDebugFrame();
28
29 /// \brief Dump the section data into the given stream.
30 void dump(raw_ostream &OS) const;
31
32 /// \brief Parse the section from raw data.
33 /// data is assumed to be pointing to the beginning of the section.
34 void parse(DataExtractor Data);
35
36private:
Stephen Hinesdce4a402014-05-29 02:49:00 -070037 std::vector<std::unique_ptr<FrameEntry>> Entries;
Eli Bendersky60bdc5b2013-02-05 23:30:58 +000038};
39
40
41} // namespace llvm
42
Stephen Hines36b56882014-04-23 16:57:46 -070043#endif