LLDB mainline
RegisterContextPOSIX_powerpc.h
Go to the documentation of this file.
1//===-- RegisterContextPOSIX_powerpc.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_POWERPC_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_POWERPC_H
11
15#include "lldb/Utility/Log.h"
16
17// Internal codes for all powerpc registers.
18enum {
58
94
131
136};
137
139public:
141 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
143
145
146 void Invalidate();
147
148 void InvalidateAllRegisters() override;
149
150 size_t GetRegisterCount() override;
151
152 virtual size_t GetGPRSize();
153
154 virtual unsigned GetRegisterSize(unsigned reg);
155
156 virtual unsigned GetRegisterOffset(unsigned reg);
157
158 const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
159
160 size_t GetRegisterSetCount() override;
161
162 const lldb_private::RegisterSet *GetRegisterSet(size_t set) override;
163
164 const char *GetRegisterName(unsigned reg);
165
166protected:
167 uint64_t
168 m_gpr_powerpc[k_num_gpr_registers_powerpc]; // general purpose registers.
169 uint64_t
170 m_fpr_powerpc[k_num_fpr_registers_powerpc]; // floating point registers.
172 std::unique_ptr<lldb_private::RegisterInfoInterface>
173 m_register_info_up; // Register Info Interface (FreeBSD or Linux)
174
175 // Determines if an extended register set is supported on the processor
176 // running the inferior process.
177 virtual bool IsRegisterSetAvailable(size_t set_index);
178
180
181 bool IsGPR(unsigned reg);
182
183 bool IsFPR(unsigned reg);
184
185 bool IsVMX(unsigned reg);
186
187 virtual bool ReadGPR() = 0;
188 virtual bool ReadFPR() = 0;
189 virtual bool ReadVMX() = 0;
190 virtual bool WriteGPR() = 0;
191 virtual bool WriteFPR() = 0;
192 virtual bool WriteVMX() = 0;
193};
194
195#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_POWERPC_H
@ k_num_fpr_registers_powerpc
@ k_num_vmx_registers_powerpc
@ k_num_gpr_registers_powerpc
uint32_t m_vmx_powerpc[k_num_vmx_registers_powerpc][4]
const char * GetRegisterName(unsigned reg)
uint64_t m_gpr_powerpc[k_num_gpr_registers_powerpc]
uint64_t m_fpr_powerpc[k_num_fpr_registers_powerpc]
virtual unsigned GetRegisterOffset(unsigned reg)
const lldb_private::RegisterSet * GetRegisterSet(size_t set) override
virtual unsigned GetRegisterSize(unsigned reg)
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
virtual bool IsRegisterSetAvailable(size_t set_index)
~RegisterContextPOSIX_powerpc() override
std::unique_ptr< lldb_private::RegisterInfoInterface > m_register_info_up
RegisterInfo interface to patch RegisterInfo structure for archs.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.