DWARFDebugFrame.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGFRAME_H
  10. #define LLVM_LIB_DEBUGINFO_DWARFDEBUGFRAME_H
  11. #include "llvm/Support/DataExtractor.h"
  12. #include "llvm/Support/raw_ostream.h"
  13. #include <memory>
  14. #include <vector>
  15. namespace llvm {
  16. class FrameEntry;
  17. /// \brief A parsed .debug_frame section
  18. ///
  19. class DWARFDebugFrame {
  20. public:
  21. DWARFDebugFrame();
  22. ~DWARFDebugFrame();
  23. /// \brief Dump the section data into the given stream.
  24. void dump(raw_ostream &OS) const;
  25. /// \brief Parse the section from raw data.
  26. /// data is assumed to be pointing to the beginning of the section.
  27. void parse(DataExtractor Data);
  28. private:
  29. std::vector<std::unique_ptr<FrameEntry>> Entries;
  30. };
  31. } // namespace llvm
  32. #endif