summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h')
-rw-r--r--lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h b/lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h
new file mode 100644
index 00000000000..d91f164a2f9
--- /dev/null
+++ b/lldb/source/Plugins/Process/Utility/UnwindLibUnwind.h
@@ -0,0 +1,66 @@
+//===-- UnwindLibUnwind.h ---------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef lldb_UnwindLibUnwind_h_
+#define lldb_UnwindLibUnwind_h_
+
+// C Includes
+// C++ Includes
+#include <vector>
+
+// Other libraries and framework includes
+#include "libunwind.h"
+
+// Project includes
+#include "lldb/lldb-private.h"
+#include "lldb/Target/Unwind.h"
+
+class UnwindLibUnwind : public lldb_private::Unwind
+{
+public:
+ UnwindLibUnwind (lldb_private::Thread &thread,
+ lldb_private::unw_addr_space_t addr_space);
+
+ virtual
+ ~UnwindLibUnwind()
+ {
+ }
+
+ virtual void
+ Clear()
+ {
+ m_cursors.clear();
+ }
+
+ virtual uint32_t
+ GetFrameCount();
+
+ bool
+ GetFrameInfoAtIndex (uint32_t frame_idx,
+ lldb::addr_t& cfa,
+ lldb::addr_t& pc);
+
+ lldb_private::RegisterContext *
+ CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
+
+ lldb_private::Thread &
+ GetThread();
+
+private:
+ lldb_private::unw_addr_space_t m_addr_space;
+ std::vector<lldb_private::unw_cursor_t> m_cursors;
+ uint32_t m_pc_regnum;
+ uint32_t m_sp_regnum;
+ //------------------------------------------------------------------
+ // For UnwindLibUnwind only
+ //------------------------------------------------------------------
+ DISALLOW_COPY_AND_ASSIGN (UnwindLibUnwind);
+};
+
+#endif // lldb_UnwindLibUnwind_h_
OpenPOWER on IntegriCloud