LLDB  mainline
RegisterContextPOSIX_arm.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIX_arm.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 LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
11 
12 #include "RegisterInfoInterface.h"
15 #include "lldb/Utility/Log.h"
16 
17 class ProcessMonitor;
18 
20 public:
22  uint32_t concrete_frame_idx,
24 
25  ~RegisterContextPOSIX_arm() override;
26 
27  void Invalidate();
28 
29  void InvalidateAllRegisters() override;
30 
31  size_t GetRegisterCount() override;
32 
33  virtual size_t GetGPRSize();
34 
35  virtual unsigned GetRegisterSize(unsigned reg);
36 
37  virtual unsigned GetRegisterOffset(unsigned reg);
38 
39  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
40 
41  size_t GetRegisterSetCount() override;
42 
43  const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
44 
45  const char *GetRegisterName(unsigned reg);
46 
47 protected:
48  struct RegInfo {
52 
56 
59 
61  };
62 
63  struct QReg {
64  uint8_t bytes[16];
65  };
66 
67  struct FPU {
68  union {
69  uint32_t s[32];
70  uint64_t d[32];
71  QReg q[16]; // the 128-bit NEON registers
72  } floats;
74  };
75 
77  // purpose
78  // registers.
81  m_fpr; // floating-point registers including extended register sets.
82  std::unique_ptr<lldb_private::RegisterInfoInterface>
83  m_register_info_up; // Register Info Interface (FreeBSD or Linux)
84 
85  // Determines if an extended register set is supported on the processor
86  // running the inferior process.
87  virtual bool IsRegisterSetAvailable(size_t set_index);
88 
89  virtual const lldb_private::RegisterInfo *GetRegisterInfo();
90 
91  bool IsGPR(unsigned reg);
92 
93  bool IsFPR(unsigned reg);
94 
95  virtual bool ReadGPR() = 0;
96  virtual bool ReadFPR() = 0;
97  virtual bool WriteGPR() = 0;
98  virtual bool WriteFPR() = 0;
99 };
100 
101 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
virtual bool ReadGPR()=0
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
RegisterContextPOSIX_arm(lldb_private::Thread &thread, uint32_t concrete_frame_idx, lldb_private::RegisterInfoInterface *register_info)
RegisterInfo interface to patch RegisterInfo structure for archs.
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
virtual unsigned GetRegisterOffset(unsigned reg)
const char * GetRegisterName(unsigned reg)
virtual bool IsRegisterSetAvailable(size_t set_index)
Manages communication with the inferior (debugee) process.
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
struct RegisterContextPOSIX_arm::FPU m_fpr
virtual bool ReadFPR()=0
virtual unsigned GetRegisterSize(unsigned reg)
virtual bool WriteGPR()=0
virtual bool WriteFPR()=0
std::unique_ptr< lldb_private::RegisterInfoInterface > m_register_info_up
uint32_t m_gpr_arm[lldb_private::k_num_gpr_registers_arm]