]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / llvm / tools / lldb / source / Plugins / Process / Utility / RegisterContextMacOSXFrameBackchain.h
1 //===-- RegisterContextMacOSXFrameBackchain.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 lldb_RegisterContextMacOSXFrameBackchain_h_
11 #define lldb_RegisterContextMacOSXFrameBackchain_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/lldb-private.h"
18 #include "lldb/Target/RegisterContext.h"
19
20 #include "UnwindMacOSXFrameBackchain.h"
21
22 class RegisterContextMacOSXFrameBackchain : public lldb_private::RegisterContext
23 {
24 public:
25     //------------------------------------------------------------------
26     // Constructors and Destructors
27     //------------------------------------------------------------------
28     RegisterContextMacOSXFrameBackchain (lldb_private::Thread &thread,
29                                          uint32_t concrete_frame_idx,
30                                          const UnwindMacOSXFrameBackchain::Cursor &cursor);
31
32     virtual
33     ~RegisterContextMacOSXFrameBackchain ();
34
35     //------------------------------------------------------------------
36     // Subclasses must override these functions
37     //------------------------------------------------------------------
38     virtual void
39     InvalidateAllRegisters ();
40
41     virtual size_t
42     GetRegisterCount ();
43
44     virtual const lldb_private::RegisterInfo *
45     GetRegisterInfoAtIndex (size_t reg);
46
47     virtual size_t
48     GetRegisterSetCount ();
49
50     virtual const lldb_private::RegisterSet *
51     GetRegisterSet (size_t reg_set);
52
53     virtual bool
54     ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
55
56     virtual bool
57     WriteRegister (const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
58     
59     virtual bool
60     ReadAllRegisterValues (lldb::DataBufferSP &data_sp);
61
62     virtual bool
63     WriteAllRegisterValues (const lldb::DataBufferSP &data_sp);
64
65     virtual uint32_t
66     ConvertRegisterKindToRegisterNumber (uint32_t kind, uint32_t num);
67     
68 private:
69     UnwindMacOSXFrameBackchain::Cursor m_cursor;
70     bool m_cursor_is_valid;
71     //------------------------------------------------------------------
72     // For RegisterContextMacOSXFrameBackchain only
73     //------------------------------------------------------------------
74     DISALLOW_COPY_AND_ASSIGN (RegisterContextMacOSXFrameBackchain);
75 };
76
77 #endif  // lldb_RegisterContextMacOSXFrameBackchain_h_