blob: 2e99ebd9090aeceb341fb1f82c54eb436d0602b7 [file] [log] [blame]
Jason Molenda3a4ea242010-09-10 07:49:16 +00001//===-- UnwindAssemblyProfiler-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_UnwindAssemblyProfiler_x86_h_
11#define liblldb_UnwindAssemblyProfiler_x86_h_
12
13#include "lldb/lldb-private.h"
14#include "lldb/Utility/UnwindAssemblyProfiler.h"
15#include "lldb/Target/Thread.h"
16
17namespace lldb_private {
18
19class UnwindAssemblyProfiler_x86 : public lldb_private::UnwindAssemblyProfiler
20{
21public:
22
23 ~UnwindAssemblyProfiler_x86 () { }
24
25 virtual bool
26 GetNonCallSiteUnwindPlanFromAssembly (AddressRange& func, lldb_private::Thread& thread, UnwindPlan& unwind_plan);
27
28 virtual bool
29 GetFastUnwindPlan (AddressRange& func, lldb_private::Thread& thread, UnwindPlan &unwind_plan);
30
31 // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch).
32 virtual bool
33 FirstNonPrologueInsn (AddressRange& func, lldb_private::Target& target, lldb_private::Thread* thread, Address& first_non_prologue_insn);
34
35 static lldb_private::UnwindAssemblyProfiler *
36 CreateInstance (const lldb_private::ArchSpec &arch);
37
38
39 //------------------------------------------------------------------
40 // PluginInterface protocol
41 //------------------------------------------------------------------
42 static void
43 Initialize();
44
45 static void
46 Terminate();
47
48 static const char *
49 GetPluginNameStatic();
50
51 static const char *
52 GetPluginDescriptionStatic();
53
54 virtual const char *
55 GetPluginName();
56
57 virtual const char *
58 GetShortPluginName();
59
60 virtual uint32_t
61 GetPluginVersion();
62
63 virtual void
64 GetPluginCommandHelp (const char *command, lldb_private::Stream *strm);
65
66 virtual lldb_private::Error
67 ExecutePluginCommand (lldb_private::Args &command, lldb_private::Stream *strm);
68
69 virtual lldb_private::Log *
70 EnablePluginLogging (lldb_private::Stream *strm, lldb_private::Args &command);
71
72private:
73 UnwindAssemblyProfiler_x86(int cpu) :
74 lldb_private::UnwindAssemblyProfiler(), m_cpu(cpu) { } // Call CreateInstance instead.
75
76 int m_cpu;
77};
78
79
80} // namespace lldb_private
81
82#endif // liblldb_UnwindAssemblyProfiler_x86_h_