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
18class UnwindAssembly_x86 : public lldb_private::UnwindAssembly
19{
20public:
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    GetFastUnwindPlan (lldb_private::AddressRange& func,
31                       lldb_private::Thread& thread,
32                       lldb_private::UnwindPlan &unwind_plan);
33
34    // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
35    virtual bool
36    FirstNonPrologueInsn (lldb_private::AddressRange& func,
37                          const lldb_private::ExecutionContext &exe_ctx,
38                          lldb_private::Address& first_non_prologue_insn);
39
40    static lldb_private::UnwindAssembly *
41    CreateInstance (const lldb_private::ArchSpec &arch);
42
43
44    //------------------------------------------------------------------
45    // PluginInterface protocol
46    //------------------------------------------------------------------
47    static void
48    Initialize();
49
50    static void
51    Terminate();
52
53    static lldb_private::ConstString
54    GetPluginNameStatic();
55
56    static const char *
57    GetPluginDescriptionStatic();
58
59    virtual lldb_private::ConstString
60    GetPluginName();
61
62    virtual uint32_t
63    GetPluginVersion();
64
65private:
66    UnwindAssembly_x86 (const lldb_private::ArchSpec &arch, int cpu);
67
68    int m_cpu;
69    lldb_private::ArchSpec m_arch;
70};
71
72
73#endif // liblldb_UnwindAssembly_x86_h_
74