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"
13 #include "RegisterInfoPOSIX_arm.h"
15 #include "lldb/Utility/Log.h"
16 
18 public:
20  lldb_private::Thread &thread,
21  std::unique_ptr<RegisterInfoPOSIX_arm> register_info);
22 
23  ~RegisterContextPOSIX_arm() override;
24 
25  void Invalidate();
26 
27  void InvalidateAllRegisters() override;
28 
29  size_t GetRegisterCount() override;
30 
31  virtual size_t GetGPRSize();
32 
33  virtual unsigned GetRegisterSize(unsigned reg);
34 
35  virtual unsigned GetRegisterOffset(unsigned reg);
36 
37  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
38 
39  size_t GetRegisterSetCount() override;
40 
41  const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
42 
43  const char *GetRegisterName(unsigned reg);
44 
45 protected:
46  std::unique_ptr<RegisterInfoPOSIX_arm> m_register_info_up;
47 
48  virtual const lldb_private::RegisterInfo *GetRegisterInfo();
49 
50  bool IsGPR(unsigned reg);
51 
52  bool IsFPR(unsigned reg);
53 
54  size_t GetFPUSize() { return sizeof(RegisterInfoPOSIX_arm::FPU); }
55 
56  virtual bool ReadGPR() = 0;
57  virtual bool ReadFPR() = 0;
58  virtual bool WriteGPR() = 0;
59  virtual bool WriteFPR() = 0;
60 };
61 
62 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
RegisterContextPOSIX_arm::GetRegisterSet
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
Definition: RegisterContextPOSIX_arm.cpp:90
RegisterContextPOSIX_arm::GetRegisterSize
virtual unsigned GetRegisterSize(unsigned reg)
Definition: RegisterContextPOSIX_arm.cpp:58
RegisterInfoPOSIX_arm::FPU
Definition: RegisterInfoPOSIX_arm.h:29
RegisterContextPOSIX_arm::IsFPR
bool IsFPR(unsigned reg)
Definition: RegisterContextPOSIX_arm.cpp:35
RegisterInfoPOSIX_arm.h
RegisterContextPOSIX_arm::GetRegisterSetCount
size_t GetRegisterSetCount() override
Definition: RegisterContextPOSIX_arm.cpp:85
RegisterContextPOSIX_arm::WriteGPR
virtual bool WriteGPR()=0
RegisterInfoInterface.h
RegisterContextPOSIX_arm::GetRegisterInfo
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
Definition: RegisterContextPOSIX_arm.cpp:70
RegisterContextPOSIX_arm::GetFPUSize
size_t GetFPUSize()
Definition: RegisterContextPOSIX_arm.h:54
RegisterContextPOSIX_arm::GetGPRSize
virtual size_t GetGPRSize()
Definition: RegisterContextPOSIX_arm.cpp:66
RegisterContextPOSIX_arm::ReadFPR
virtual bool ReadFPR()=0
RegisterContextPOSIX_arm
Definition: RegisterContextPOSIX_arm.h:17
RegisterContextPOSIX_arm::WriteFPR
virtual bool WriteFPR()=0
Log.h
lldb_private::Thread
Definition: Thread.h:62
RegisterContextPOSIX_arm::RegisterContextPOSIX_arm
RegisterContextPOSIX_arm(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm > register_info)
Definition: RegisterContextPOSIX_arm.cpp:42
set
set(option_framework FRAMEWORK) endif() if(LLDB_ENABLE_PYTHON) get_target_property(python_bindings_dir swig_wrapper_python BINARY_DIR) set(lldb_python_wrapper $
Definition: API/CMakeLists.txt:9
lldb_private::RegisterContext
Definition: RegisterContext.h:17
RegisterContextPOSIX_arm::GetRegisterCount
size_t GetRegisterCount() override
Definition: RegisterContextPOSIX_arm.cpp:62
RegisterContextPOSIX_arm::Invalidate
void Invalidate()
Definition: RegisterContextPOSIX_arm.cpp:50
RegisterContextPOSIX_arm::InvalidateAllRegisters
void InvalidateAllRegisters() override
Definition: RegisterContextPOSIX_arm.cpp:52
RegisterContextPOSIX_arm::IsGPR
bool IsGPR(unsigned reg)
Definition: RegisterContextPOSIX_arm.cpp:28
RegisterContextPOSIX_arm::GetRegisterOffset
virtual unsigned GetRegisterOffset(unsigned reg)
Definition: RegisterContextPOSIX_arm.cpp:54
RegisterContextPOSIX_arm::m_register_info_up
std::unique_ptr< RegisterInfoPOSIX_arm > m_register_info_up
Definition: RegisterContextPOSIX_arm.h:46
RegisterContextPOSIX_arm::ReadGPR
virtual bool ReadGPR()=0
RegisterContextPOSIX_arm::~RegisterContextPOSIX_arm
~RegisterContextPOSIX_arm() override
Definition: RegisterContextPOSIX_arm.cpp:48
RegisterContext.h
RegisterContextPOSIX_arm::GetRegisterInfoAtIndex
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
Definition: RegisterContextPOSIX_arm.cpp:78
RegisterContextPOSIX_arm::GetRegisterName
const char * GetRegisterName(unsigned reg)
Definition: RegisterContextPOSIX_arm.cpp:94