LLDB  mainline
RegisterContextPOSIX_mips64.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIX_mips64.h ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef liblldb_RegisterContextPOSIX_mips64_h_
10 #define liblldb_RegisterContextPOSIX_mips64_h_
11 
12 #include "RegisterContext_mips.h"
13 #include "RegisterInfoInterface.h"
15 #include "lldb/Utility/Log.h"
16 
17 using namespace lldb_private;
18 
19 class ProcessMonitor;
20 
22 public:
23 
25  gpr_registers_count = 0,
28  register_set_count
29  };
30 
32  lldb_private::Thread &thread, uint32_t concrete_frame_idx,
34 
35  ~RegisterContextPOSIX_mips64() override;
36 
37  void Invalidate();
38 
39  void InvalidateAllRegisters() override;
40 
41  size_t GetRegisterCount() override;
42 
43  virtual size_t GetGPRSize();
44 
45  virtual unsigned GetRegisterSize(unsigned reg);
46 
47  virtual unsigned GetRegisterOffset(unsigned reg);
48 
49  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
50 
51  size_t GetRegisterSetCount() override;
52 
53  const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
54 
55  const char *GetRegisterName(unsigned reg);
56 
57  uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
58  uint32_t num) override;
59 
60 protected:
62  uint8_t m_registers_count[register_set_count];
63  std::unique_ptr<lldb_private::RegisterInfoInterface>
64  m_register_info_up; // Register Info Interface (FreeBSD or Linux)
65 
66  // Determines if an extended register set is supported on the processor
67  // running the inferior process.
68  virtual bool IsRegisterSetAvailable(size_t set_index);
69 
70  virtual const lldb_private::RegisterInfo *GetRegisterInfo();
71 
72  bool IsGPR(unsigned reg);
73 
74  bool IsFPR(unsigned reg);
75 
76  lldb::ByteOrder GetByteOrder();
77 
78  virtual bool ReadGPR() = 0;
79  virtual bool ReadFPR() = 0;
80  virtual bool WriteGPR() = 0;
81  virtual bool WriteFPR() = 0;
82 };
83 
84 #endif // liblldb_RegisterContextPOSIX_mips64_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
RegisterInfo interface to patch RegisterInfo structure for archs.
std::unique_ptr< lldb_private::RegisterInfoInterface > m_register_info_up
Manages communication with the inferior (debugee) process.