1 //===-- RegisterContextPOSIX_arm.h ------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
12 #include "RegisterInfoInterface.h"
13 #include "RegisterInfoPOSIX_arm.h"
14 #include "lldb/Target/RegisterContext.h"
15 #include "lldb/Utility/Log.h"
17 class RegisterContextPOSIX_arm
: public lldb_private::RegisterContext
{
19 RegisterContextPOSIX_arm(
20 lldb_private::Thread
&thread
,
21 std::unique_ptr
<RegisterInfoPOSIX_arm
> register_info
);
23 ~RegisterContextPOSIX_arm() override
;
27 void InvalidateAllRegisters() override
;
29 size_t GetRegisterCount() override
;
31 virtual size_t GetGPRSize();
33 virtual unsigned GetRegisterSize(unsigned reg
);
35 virtual unsigned GetRegisterOffset(unsigned reg
);
37 const lldb_private::RegisterInfo
*GetRegisterInfoAtIndex(size_t reg
) override
;
39 size_t GetRegisterSetCount() override
;
41 const lldb_private::RegisterSet
*GetRegisterSet(size_t set
) override
;
43 const char *GetRegisterName(unsigned reg
);
46 std::unique_ptr
<RegisterInfoPOSIX_arm
> m_register_info_up
;
48 virtual const lldb_private::RegisterInfo
*GetRegisterInfo();
50 bool IsGPR(unsigned reg
);
52 bool IsFPR(unsigned reg
);
54 size_t GetFPUSize() { return sizeof(RegisterInfoPOSIX_arm::FPU
); }
56 virtual bool ReadGPR() = 0;
57 virtual bool ReadFPR() = 0;
58 virtual bool WriteGPR() = 0;
59 virtual bool WriteFPR() = 0;
62 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H