Unwind.h revision 24943d2ee8bfaa7cf5893e4709143924157a5c1e
1//===-- Unwind.h ------------------------------------------------*- 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 liblldb_Unwind_h_ 11#define liblldb_Unwind_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/lldb-private.h" 18 19namespace lldb_private { 20 21class Unwind 22{ 23protected: 24 //------------------------------------------------------------------ 25 // Classes that inherit from Unwind can see and modify these 26 //------------------------------------------------------------------ 27 Unwind(Thread &thread) : 28 m_thread (thread) 29 { 30 } 31 32public: 33 virtual 34 ~Unwind() 35 { 36 } 37 38 virtual void 39 Clear() = 0; 40 41 virtual uint32_t 42 GetFrameCount() = 0; 43 44 virtual bool 45 GetFrameInfoAtIndex (uint32_t frame_idx, 46 lldb::addr_t& cfa, 47 lldb::addr_t& pc) = 0; 48 49 virtual RegisterContext * 50 CreateRegisterContextForFrame (StackFrame *frame) = 0; 51 52 Thread & 53 GetThread() 54 { 55 return m_thread; 56 } 57 58protected: 59 //------------------------------------------------------------------ 60 // Classes that inherit from Unwind can see and modify these 61 //------------------------------------------------------------------ 62 Thread &m_thread; 63private: 64 DISALLOW_COPY_AND_ASSIGN (Unwind); 65}; 66 67} // namespace lldb_private 68 69#endif // liblldb_Unwind_h_ 70