blob: 97714b99da4b48196246a5c702edc346d4a2d740 [file] [log] [blame]
Jason Molendaea0dbca2010-09-22 07:37:07 +00001//===-- ArchVolatileRegs-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_ArchVolatileRegs_x86_h_
11#define liblldb_ArchVolatileRegs_x86_h_
12
13#include "lldb/lldb-private.h"
14#include "lldb/Utility/ArchVolatileRegs.h"
15#include <set>
16
17namespace lldb_private {
18
19class ArchVolatileRegs_x86 : public lldb_private::ArchVolatileRegs
20{
21public:
22
23 ~ArchVolatileRegs_x86 () { }
24
25 bool
26 RegisterIsVolatile (lldb_private::Thread& thread, uint32_t regnum);
27
28 static lldb_private::ArchVolatileRegs *
29 CreateInstance (const lldb_private::ArchSpec &arch);
30
31 //------------------------------------------------------------------
32 // PluginInterface protocol
33 //------------------------------------------------------------------
34 static void
35 Initialize();
36
37 static void
38 Terminate();
39
40 static const char *
41 GetPluginNameStatic();
42
43 static const char *
44 GetPluginDescriptionStatic();
45
46 virtual const char *
47 GetPluginName();
48
49 virtual const char *
50 GetShortPluginName();
51
52 virtual uint32_t
53 GetPluginVersion();
54
55 virtual void
56 GetPluginCommandHelp (const char *command, lldb_private::Stream *strm);
57
58 virtual lldb_private::Error
59 ExecutePluginCommand (lldb_private::Args &command, lldb_private::Stream *strm);
60
61 virtual lldb_private::Log *
62 EnablePluginLogging (lldb_private::Stream *strm, lldb_private::Args &command);
63
64private:
65 ArchVolatileRegs_x86(int cpu); // Call CreateInstance instead.
66
67 void initialize_regset(lldb_private::Thread& thread);
68
69 int m_cpu;
70 std::set<int> m_non_volatile_regs;
71};
72
73
74} // namespace lldb_private
75
76#endif // liblldb_ArchVolatileRegs_x86_h_