1 //===-- UnwindAssembly-x86.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_UnwindAssembly_x86_h_ 11 #define liblldb_UnwindAssembly_x86_h_ 12 13 #include "llvm-c/Disassembler.h" 14 15 #include "lldb/lldb-private.h" 16 #include "lldb/Target/UnwindAssembly.h" 17 18 class UnwindAssembly_x86 : public lldb_private::UnwindAssembly 19 { 20 public: 21 22 ~UnwindAssembly_x86 (); 23 24 virtual bool 25 GetNonCallSiteUnwindPlanFromAssembly (lldb_private::AddressRange& func, 26 lldb_private::Thread& thread, 27 lldb_private::UnwindPlan& unwind_plan); 28 29 virtual bool 30 AugmentUnwindPlanFromCallSite (lldb_private::AddressRange& func, 31 lldb_private::Thread& thread, 32 lldb_private::UnwindPlan& unwind_plan); 33 34 virtual bool 35 GetFastUnwindPlan (lldb_private::AddressRange& func, 36 lldb_private::Thread& thread, 37 lldb_private::UnwindPlan &unwind_plan); 38 39 // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch). 40 virtual bool 41 FirstNonPrologueInsn (lldb_private::AddressRange& func, 42 const lldb_private::ExecutionContext &exe_ctx, 43 lldb_private::Address& first_non_prologue_insn); 44 45 static lldb_private::UnwindAssembly * 46 CreateInstance (const lldb_private::ArchSpec &arch); 47 48 49 //------------------------------------------------------------------ 50 // PluginInterface protocol 51 //------------------------------------------------------------------ 52 static void 53 Initialize(); 54 55 static void 56 Terminate(); 57 58 static lldb_private::ConstString 59 GetPluginNameStatic(); 60 61 static const char * 62 GetPluginDescriptionStatic(); 63 64 virtual lldb_private::ConstString 65 GetPluginName(); 66 67 virtual uint32_t 68 GetPluginVersion(); 69 70 private: 71 UnwindAssembly_x86 (const lldb_private::ArchSpec &arch, int cpu); 72 73 int m_cpu; 74 lldb_private::ArchSpec m_arch; 75 }; 76 77 78 #endif // liblldb_UnwindAssembly_x86_h_ 79