]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h
MFH
[FreeBSD/FreeBSD.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     RegisterContextMacOSXFrameBackchain (lldb_private::Thread &thread,
26                                          uint32_t concrete_frame_idx,
27                                          const UnwindMacOSXFrameBackchain::Cursor &cursor);
28
29     ~RegisterContextMacOSXFrameBackchain() override;
30
31     void
32     InvalidateAllRegisters() override;
33
34     size_t
35     GetRegisterCount() override;
36
37     const lldb_private::RegisterInfo *
38     GetRegisterInfoAtIndex(size_t reg) override;
39
40     size_t
41     GetRegisterSetCount() override;
42
43     const lldb_private::RegisterSet *
44     GetRegisterSet(size_t reg_set) override;
45
46     bool
47     ReadRegister(const lldb_private::RegisterInfo *reg_info,
48                  lldb_private::RegisterValue &value) override;
49
50     bool
51     WriteRegister(const lldb_private::RegisterInfo *reg_info,
52                   const lldb_private::RegisterValue &value) override;
53     
54     bool
55     ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
56
57     bool
58     WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
59
60     uint32_t
61     ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override;
62     
63 private:
64     UnwindMacOSXFrameBackchain::Cursor m_cursor;
65     bool m_cursor_is_valid;
66
67     DISALLOW_COPY_AND_ASSIGN (RegisterContextMacOSXFrameBackchain);
68 };
69
70 #endif // lldb_RegisterContextMacOSXFrameBackchain_h_