LLDB mainline
NativeRegisterContextAIX_ppc64.h
Go to the documentation of this file.
1//===------ NativeRegisterContextAIX_ppc64.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#if defined(__powerpc64__)
10
11#ifndef LLDB_SOURCE_PLUGINS_PROCESS_AIX_NATIVEREGISTERCONTEXTAIX_PPC64_H
12#define LLDB_SOURCE_PLUGINS_PROCESS_AIX_NATIVEREGISTERCONTEXTAIX_PPC64_H
13
16
17namespace lldb_private {
18namespace process_aix {
19
21
22class NativeRegisterContextAIX_ppc64 : public NativeRegisterContextAIX {
23public:
24 NativeRegisterContextAIX_ppc64(const ArchSpec &target_arch,
25 NativeThreadProtocol &native_thread);
26
27 uint32_t GetRegisterSetCount() const override;
28
29 uint32_t GetUserRegisterCount() const override;
30
31 const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
32
33 Status ReadRegister(const RegisterInfo *reg_info,
34 RegisterValue &reg_value) override;
35
36 Status WriteRegister(const RegisterInfo *reg_info,
37 const RegisterValue &reg_value) override;
38
39 Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
40
41 Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
42
43private:
44 bool IsGPR(unsigned reg) const;
45
46 bool IsFPR(unsigned reg) const;
47
48 bool IsVMX(unsigned reg) const;
49
50 bool IsVSX(unsigned reg) const;
51
52 uint32_t CalculateFprOffset(const RegisterInfo *reg_info) const;
53
54 uint32_t CalculateVmxOffset(const RegisterInfo *reg_info) const;
55
56 uint32_t CalculateVsxOffset(const RegisterInfo *reg_info) const;
57};
58
59} // namespace process_aix
60} // namespace lldb_private
61
62#endif // #ifndef LLDB_SOURCE_PLUGINS_PROCESS_AIX_NATIVEREGISTERCONTEXTAIX_H
63
64#endif // defined(__powerpc64__)
Manages communication with the inferior (debugee) process.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP