[Lldb-commits] [lldb] [llvm] [lldb] Rename common register metadata providers (PR #232566)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 15 18:53:39 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Minsoo Choo (mchoo7)
<details>
<summary>Changes</summary>
These files are not specific to POSIX. For example, Windows plugins use these as RegisterInfoInterface while Darwin does not make use of these even though it is a POSIX-compliant OS.
---
Patch is 150.65 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/232566.diff
69 Files Affected:
- (modified) lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp (+3-3)
- (modified) lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp (+6-6)
- (modified) lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.h (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.h (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.cpp (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.h (+1-1)
- (modified) lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp (+8-8)
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp (+14-14)
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h (+2-2)
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp (+14-14)
- (modified) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h (+2-2)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp (+7-7)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h (+4-4)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp (+19-19)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h (+5-5)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp (+9-9)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h (+7-7)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp (+9-9)
- (modified) lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h (+5-5)
- (modified) lldb/source/Plugins/Process/Utility/CMakeLists.txt (+8-8)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp (+3-3)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h (+4-4)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp (+3-3)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h (+4-4)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.cpp (+5-5)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h (+4-4)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.cpp (+3-3)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.h (+4-4)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h (+4-4)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommonDynamic_riscv32.cpp (+14-13)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommonDynamic_riscv32.h (+5-5)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_arm.cpp (+25-25)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_arm.h (+6-6)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_arm64.cpp (+70-70)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_arm64.h (+5-5)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_loongarch64.cpp (+27-27)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_loongarch64.h (+5-5)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_ppc64.cpp (+7-7)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_ppc64.h (+6-6)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_ppc64le.cpp (+8-8)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_ppc64le.h (+5-5)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_riscv32.cpp (+18-18)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_riscv32.h (+5-5)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_riscv64.cpp (+17-17)
- (renamed) lldb/source/Plugins/Process/Utility/RegisterInfoCommon_riscv64.h (+5-5)
- (modified) lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h (+1-1)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp (+1-1)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h (+1-1)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp (+14-14)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h (+1-1)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.h (+2-2)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp (+2-2)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.h (+3-3)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.cpp (+4-4)
- (modified) lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.h (+2-2)
- (modified) lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp (+5-5)
- (modified) lldb/unittests/Instruction/ARM64/TestAArch64Emulator.cpp (+2-2)
- (modified) lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp (+3-3)
- (modified) lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp (+4-4)
- (modified) lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp (+5-5)
- (modified) llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn (+8-8)
``````````diff
diff --git a/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp b/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
index db32bf8a4dd51a..5090ddf0b6d1e9 100644
--- a/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
+++ b/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
@@ -11,7 +11,7 @@
#include "EmulateInstructionLoongArch.h"
#include "Plugins/Process/Utility/InstructionUtils.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_loongarch64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_loongarch64.h"
#include "Plugins/Process/Utility/lldb-loongarch-register-enums.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/PluginManager.h"
@@ -162,9 +162,9 @@ EmulateInstructionLoongArch::GetRegisterInfo(lldb::RegisterKind reg_kind,
}
const RegisterInfo *array =
- RegisterInfoPOSIX_loongarch64::GetRegisterInfoPtr(m_arch);
+ RegisterInfoCommon_loongarch64::GetRegisterInfoPtr(m_arch);
const uint32_t length =
- RegisterInfoPOSIX_loongarch64::GetRegisterInfoCount(m_arch);
+ RegisterInfoCommon_loongarch64::GetRegisterInfoCount(m_arch);
if (reg_index >= length || reg_kind != eRegisterKindLLDB)
return {};
diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index 1abedc050af639..ba6990ba235a7f 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -8,8 +8,8 @@
#include "EmulateInstructionRISCV.h"
#include "Plugins/Process/Utility/RegisterInfoInterface.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_riscv32.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_riscv32.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_riscv64.h"
#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
#include "RISCVCInstructions.h"
#include "RISCVInstructions.h"
@@ -1843,12 +1843,12 @@ EmulateInstructionRISCV::GetRegisterInfo(RegisterKind reg_kind,
std::unique_ptr<RegisterInfoInterface> reg_info;
switch (m_arch.GetTriple().getArch()) {
case llvm::Triple::riscv32:
- reg_info = std::make_unique<RegisterInfoPOSIX_riscv32>(
- m_arch, RegisterInfoPOSIX_riscv32::eRegsetMaskAll);
+ reg_info = std::make_unique<RegisterInfoCommon_riscv32>(
+ m_arch, RegisterInfoCommon_riscv32::eRegsetMaskAll);
break;
case llvm::Triple::riscv64:
- reg_info = std::make_unique<RegisterInfoPOSIX_riscv64>(
- m_arch, RegisterInfoPOSIX_riscv64::eRegsetMaskAll);
+ reg_info = std::make_unique<RegisterInfoCommon_riscv64>(
+ m_arch, RegisterInfoCommon_riscv64::eRegsetMaskAll);
break;
default:
assert(false && "unsupported triple");
diff --git a/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp b/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp
index 847a1b486a9980..0726e3ac779789 100644
--- a/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp
+++ b/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp
@@ -10,7 +10,7 @@
#include "NativeRegisterContextAIX_ppc64.h"
#include "NativeThreadAIX.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_ppc64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_ppc64.h"
#include "lldb/Utility/RegisterValue.h"
using namespace lldb;
@@ -106,7 +106,7 @@ NativeRegisterContextAIX::CreateHostNativeRegisterContextAIX(
NativeRegisterContextAIX_ppc64::NativeRegisterContextAIX_ppc64(
const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
: NativeRegisterContextRegisterInfo(
- native_thread, new RegisterInfoPOSIX_ppc64(target_arch)),
+ native_thread, new RegisterInfoCommon_ppc64(target_arch)),
NativeRegisterContextAIX(native_thread) {
switch (target_arch.GetMachine()) {
case llvm::Triple::ppc:
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp
index 1477cf75e9f6ff..621a7a314ab46c 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp
@@ -22,7 +22,7 @@ using namespace lldb;
using namespace lldb_private;
RegisterContextFreeBSDKernelCore_arm::RegisterContextFreeBSDKernelCore_arm(
- Thread &thread, std::unique_ptr<RegisterInfoPOSIX_arm> register_info_up,
+ Thread &thread, std::unique_ptr<RegisterInfoCommon_arm> register_info_up,
lldb::addr_t pcb_addr)
: RegisterContextPOSIX_arm(thread, std::move(register_info_up)),
m_pcb_addr(pcb_addr) {}
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.h b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.h
index cdd9f1b3288c18..8af593e9cbe5de 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.h
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.h
@@ -16,7 +16,7 @@ class RegisterContextFreeBSDKernelCore_arm : public RegisterContextPOSIX_arm {
public:
RegisterContextFreeBSDKernelCore_arm(
lldb_private::Thread &thread,
- std::unique_ptr<RegisterInfoPOSIX_arm> register_info_up,
+ std::unique_ptr<RegisterInfoCommon_arm> register_info_up,
lldb::addr_t pcb_addr);
bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp
index 80a5e0cf13a7c4..3af209e406ae9a 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp
@@ -27,7 +27,7 @@ using namespace lldb;
using namespace lldb_private;
RegisterContextFreeBSDKernelCore_arm64::RegisterContextFreeBSDKernelCore_arm64(
- Thread &thread, std::unique_ptr<RegisterInfoPOSIX_arm64> register_info_up,
+ Thread &thread, std::unique_ptr<RegisterInfoCommon_arm64> register_info_up,
lldb::addr_t pcb_addr)
: RegisterContextPOSIX_arm64(thread, std::move(register_info_up)),
m_pcb_addr(pcb_addr) {}
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.h b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.h
index 873b77782c2489..3ad5ae7b88bae6 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.h
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.h
@@ -19,7 +19,7 @@ class RegisterContextFreeBSDKernelCore_arm64
public:
RegisterContextFreeBSDKernelCore_arm64(
lldb_private::Thread &thread,
- std::unique_ptr<RegisterInfoPOSIX_arm64> register_info_up,
+ std::unique_ptr<RegisterInfoCommon_arm64> register_info_up,
lldb::addr_t pcb_addr);
bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.cpp b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.cpp
index 52a2f91742c760..0d87a0d9c8ca84 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.cpp
@@ -23,7 +23,7 @@ using namespace lldb_private;
RegisterContextFreeBSDKernelCore_riscv64::
RegisterContextFreeBSDKernelCore_riscv64(
Thread &thread,
- std::unique_ptr<RegisterInfoPOSIX_riscv64> register_info_up,
+ std::unique_ptr<RegisterInfoCommon_riscv64> register_info_up,
lldb::addr_t pcb_addr)
: RegisterContextPOSIX_riscv64(thread, std::move(register_info_up)),
m_pcb_addr(pcb_addr) {}
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.h b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.h
index 033671da8ff7da..cb96c5c989f2c1 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.h
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_riscv64.h
@@ -17,7 +17,7 @@ class RegisterContextFreeBSDKernelCore_riscv64
public:
RegisterContextFreeBSDKernelCore_riscv64(
lldb_private::Thread &thread,
- std::unique_ptr<RegisterInfoPOSIX_riscv64> register_info_up,
+ std::unique_ptr<RegisterInfoCommon_riscv64> register_info_up,
lldb::addr_t pcb_addr);
bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
index 98b73e8de87ef8..4f0e7021d692db 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
@@ -14,10 +14,10 @@
#include "Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h"
#include "Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_arm.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_arm64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_ppc64le.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_riscv64.h"
#include "ProcessFreeBSDKernelCore.h"
#include "RegisterContextFreeBSDKernelCore_arm.h"
#include "RegisterContextFreeBSDKernelCore_arm64.h"
@@ -66,23 +66,23 @@ ThreadFreeBSDKernelCore::CreateRegisterContextForFrame(StackFrame *frame) {
case llvm::Triple::aarch64:
m_thread_reg_ctx_sp =
std::make_shared<RegisterContextFreeBSDKernelCore_arm64>(
- *this, std::make_unique<RegisterInfoPOSIX_arm64>(arch, 0),
+ *this, std::make_unique<RegisterInfoCommon_arm64>(arch, 0),
m_pcb_addr);
break;
case llvm::Triple::arm:
m_thread_reg_ctx_sp =
std::make_shared<RegisterContextFreeBSDKernelCore_arm>(
- *this, std::make_unique<RegisterInfoPOSIX_arm>(arch), m_pcb_addr);
+ *this, std::make_unique<RegisterInfoCommon_arm>(arch), m_pcb_addr);
break;
case llvm::Triple::ppc64le:
m_thread_reg_ctx_sp =
std::make_shared<RegisterContextFreeBSDKernelCore_ppc64le>(
- *this, new RegisterInfoPOSIX_ppc64le(arch), m_pcb_addr);
+ *this, new RegisterInfoCommon_ppc64le(arch), m_pcb_addr);
break;
case llvm::Triple::riscv64:
m_thread_reg_ctx_sp =
std::make_shared<RegisterContextFreeBSDKernelCore_riscv64>(
- *this, std::make_unique<RegisterInfoPOSIX_riscv64>(arch, 0),
+ *this, std::make_unique<RegisterInfoCommon_riscv64>(arch, 0),
m_pcb_addr);
break;
case llvm::Triple::x86:
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
index cfee6e8e42c83e..fe4a6d3f104de0 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
@@ -15,7 +15,7 @@
#include "lldb/Utility/Status.h"
#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_arm.h"
// clang-format off
#include <sys/param.h>
@@ -36,11 +36,11 @@ NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD(
NativeRegisterContextFreeBSD_arm::NativeRegisterContextFreeBSD_arm(
const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread)
: NativeRegisterContextRegisterInfo(
- native_thread, new RegisterInfoPOSIX_arm(target_arch)) {}
+ native_thread, new RegisterInfoCommon_arm(target_arch)) {}
-RegisterInfoPOSIX_arm &
+RegisterInfoCommon_arm &
NativeRegisterContextFreeBSD_arm::GetRegisterInfo() const {
- return static_cast<RegisterInfoPOSIX_arm &>(*m_register_info_interface_up);
+ return static_cast<RegisterInfoCommon_arm &>(*m_register_info_interface_up);
}
uint32_t NativeRegisterContextFreeBSD_arm::GetRegisterSetCount() const {
@@ -61,26 +61,26 @@ uint32_t NativeRegisterContextFreeBSD_arm::GetUserRegisterCount() const {
Status NativeRegisterContextFreeBSD_arm::ReadRegisterSet(uint32_t set) {
switch (set) {
- case RegisterInfoPOSIX_arm::GPRegSet:
+ case RegisterInfoCommon_arm::GPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(),
m_reg_data.data());
- case RegisterInfoPOSIX_arm::FPRegSet:
+ case RegisterInfoCommon_arm::FPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(
PT_GETVFPREGS, m_thread.GetID(),
- m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm::GPR));
+ m_reg_data.data() + sizeof(RegisterInfoCommon_arm::GPR));
}
llvm_unreachable("NativeRegisterContextFreeBSD_arm::ReadRegisterSet");
}
Status NativeRegisterContextFreeBSD_arm::WriteRegisterSet(uint32_t set) {
switch (set) {
- case RegisterInfoPOSIX_arm::GPRegSet:
+ case RegisterInfoCommon_arm::GPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(),
m_reg_data.data());
- case RegisterInfoPOSIX_arm::FPRegSet:
+ case RegisterInfoCommon_arm::FPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(
PT_SETVFPREGS, m_thread.GetID(),
- m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm::GPR));
+ m_reg_data.data() + sizeof(RegisterInfoCommon_arm::GPR));
}
llvm_unreachable("NativeRegisterContextFreeBSD_arm::WriteRegisterSet");
}
@@ -143,11 +143,11 @@ Status NativeRegisterContextFreeBSD_arm::ReadAllRegisterValues(
lldb::WritableDataBufferSP &data_sp) {
Status error;
- error = ReadRegisterSet(RegisterInfoPOSIX_arm::GPRegSet);
+ error = ReadRegisterSet(RegisterInfoCommon_arm::GPRegSet);
if (error.Fail())
return error;
- error = ReadRegisterSet(RegisterInfoPOSIX_arm::FPRegSet);
+ error = ReadRegisterSet(RegisterInfoCommon_arm::FPRegSet);
if (error.Fail())
return error;
@@ -188,11 +188,11 @@ Status NativeRegisterContextFreeBSD_arm::WriteAllRegisterValues(
}
::memcpy(m_reg_data.data(), src, m_reg_data.size());
- error = WriteRegisterSet(RegisterInfoPOSIX_arm::GPRegSet);
+ error = WriteRegisterSet(RegisterInfoCommon_arm::GPRegSet);
if (error.Fail())
return error;
- return WriteRegisterSet(RegisterInfoPOSIX_arm::FPRegSet);
+ return WriteRegisterSet(RegisterInfoCommon_arm::FPRegSet);
}
llvm::Error NativeRegisterContextFreeBSD_arm::CopyHardwareWatchpointsFrom(
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
index b9537e6952f6c4..eecc6b89502efc 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
@@ -18,7 +18,7 @@
// clang-format on
#include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_arm.h"
#include <array>
@@ -57,7 +57,7 @@ class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD {
Status ReadRegisterSet(uint32_t set);
Status WriteRegisterSet(uint32_t set);
- RegisterInfoPOSIX_arm &GetRegisterInfo() const;
+ RegisterInfoCommon_arm &GetRegisterInfo() const;
};
} // namespace process_freebsd
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
index 1f2e0d5904148a..f30dd262ebf1ff 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
@@ -16,7 +16,7 @@
#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h"
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
+#include "Plugins/Process/Utility/RegisterInfoCommon_arm64.h"
#include "Plugins/Process/Utility/RegisterTypeDetector_arm64.h"
// clang-format off
@@ -54,16 +54,16 @@ NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD(
NativeRegisterContextFreeBSD_arm64::NativeRegisterContextFreeBSD_arm64(
const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread)
: NativeRegisterContextRegisterInfo(
- native_thread, new RegisterInfoPOSIX_arm64(target_arch, 0)),
+ native_thread, new RegisterInfoCommon_arm64(target_arch, 0)),
m_read_dbreg(false) {
g_register_type_detector.UpdateRegisterInfo(
GetRegisterInfoInterface().GetRegisterInfo(),
GetRegisterInfoInterface().GetRegisterCount());
}
-RegisterInfoPOSIX_arm64 &
+RegisterInfoCommon_arm64 &
NativeRegisterContextFreeBSD_arm64::GetRegisterInfo() const {
- return static_cast<RegisterInfoPOSIX_arm64 &>(*m_register_info_interface_up);
+ return static_cast<RegisterInfoCommon_arm64 &>(*m_register_info_interface_up);
}
uint32_t NativeRegisterContextFreeBSD_arm64::GetRegisterSetCount() const {
@@ -84,26 +84,26 @@ uint32_t NativeRegisterContextFreeBSD_arm64::GetUserRegisterCount() const {
Status NativeRegisterContextFreeBSD_arm64::ReadRegisterSet(uint32_t set) {
switch (set) {
- case RegisterInfoPOSIX_arm64::GPRegSet:
+ case RegisterInfoCommon_arm64::GPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(),
m_reg_data.data());
- case RegisterInfoPOSIX_arm64::FPRegSet:
+ case RegisterInfoCommon_arm64::FPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(
PT_GETFPREGS, m_thread.GetID(),
- m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm64::GPR));
+ m_reg_data.data() + sizeof(RegisterInfoCommon_arm64::GPR));
}
llvm_unreachable("NativeRegisterContextFreeBSD_arm64::ReadRegisterSet");
}
Status NativeRegisterContextFreeBSD_arm64::WriteRegisterSet(uint32_t set) {
switch (set) {
- case RegisterInfoPOSIX_arm64::GPRegSet:
+ case RegisterInfoCommon_arm64::GPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(),
m_reg_data.data());
- case RegisterInfoPOSIX_arm64::FPRegSet:
+ case RegisterInfoCommon_arm64::FPRegSet:
return NativeProcessFreeBSD::PtraceWrapper(
PT_SETFPREGS, m_thread.GetID(),
- m_reg_data.data() + sizeof(RegisterInfoPOSIX_arm64::GPR));
+ m_reg_data.data() + sizeof(RegisterInfoCommon_arm64::GPR));
}
llvm_unreachable("NativeRegisterContextFreeBSD_arm64::WriteRegisterSet");
}
@@ -164,11 +164,11 @@ Status NativeRegisterContextFreeBSD_arm64::ReadAllRegisterValues(
lldb::WritableDataBufferSP &data_sp) {
Status error;
- error = ReadRegisterSet(RegisterInfoPOSIX_arm64::GPRegSet);
+ error = ReadRegisterSet(RegisterInfoCommon_arm64::GPRegSet);
if (error.Fail())
return error;
- error = ReadRegisterSet(RegisterInfoPOSIX_arm64::FPRegSet);
+ error = ReadRegisterSet(RegisterInfoCommon_arm64::FPRegSet);
if (error.Fail())
return error;
@@ -209,11 +209,11 @@ Status NativeRegisterContextFreeBSD_arm64::WriteAllRegisterValues(
}
::memcpy(m_reg_data.data(), src, m_reg_data.size());
- error = WriteRegisterSet(RegisterInfoPOSIX_a...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/232566
More information about the lldb-commits
mailing list