blob: f6137389c9545aaa6c6d01162b2002773beb166d [file] [log] [blame]
Greg Claytonffc922e32011-04-25 21:05:07 +00001//===-- UnwindAssemblyInstEmulation.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_UnwindAssemblyInstEmulation_h_
11#define liblldb_UnwindAssemblyInstEmulation_h_
12
13#include "lldb/lldb-private.h"
Greg Clayton7be25422011-04-25 21:14:26 +000014#include "lldb/Target/UnwindAssembly.h"
Greg Claytonffc922e32011-04-25 21:05:07 +000015#include "lldb/Target/Thread.h"
16
Greg Clayton7be25422011-04-25 21:14:26 +000017class UnwindAssemblyInstEmulation : public lldb_private::UnwindAssembly
Greg Claytonffc922e32011-04-25 21:05:07 +000018{
19public:
20
21 virtual
22 ~UnwindAssemblyInstEmulation ()
23 {
24 }
25
26 virtual bool
27 GetNonCallSiteUnwindPlanFromAssembly (lldb_private::AddressRange& func,
28 lldb_private::Thread& thread,
29 lldb_private::UnwindPlan& unwind_plan);
30
31 virtual bool
32 GetFastUnwindPlan (lldb_private::AddressRange& func,
33 lldb_private::Thread& thread,
34 lldb_private::UnwindPlan &unwind_plan);
35
36 // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
37 virtual bool
38 FirstNonPrologueInsn (lldb_private::AddressRange& func,
39 lldb_private::Target& target,
40 lldb_private::Thread* thread,
41 lldb_private::Address& first_non_prologue_insn);
42
Greg Clayton7be25422011-04-25 21:14:26 +000043 static lldb_private::UnwindAssembly *
Greg Claytonffc922e32011-04-25 21:05:07 +000044 CreateInstance (const lldb_private::ArchSpec &arch);
45
46
47 //------------------------------------------------------------------
48 // PluginInterface protocol
49 //------------------------------------------------------------------
50 static void
51 Initialize();
52
53 static void
54 Terminate();
55
56 static const char *
57 GetPluginNameStatic();
58
59 static const char *
60 GetPluginDescriptionStatic();
61
62 virtual const char *
63 GetPluginName();
64
65 virtual const char *
66 GetShortPluginName();
67
68 virtual uint32_t
69 GetPluginVersion();
70
71private:
72
73 // Call CreateInstance to get an instance of this class
74 UnwindAssemblyInstEmulation(int cpu) :
Greg Clayton7be25422011-04-25 21:14:26 +000075 lldb_private::UnwindAssembly(), m_cpu(cpu)
Greg Claytonffc922e32011-04-25 21:05:07 +000076 {
77 }
78
79 int m_cpu;
80};
81
82#endif // liblldb_UnwindAssemblyInstEmulation_h_