[Lldb-commits] [lldb] [llvm] [lldb] Move register support out of ProcessUtility (PR #232969)

Minsoo Choo via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 16 17:49:47 PDT 2026


https://github.com/mchoo7 updated https://github.com/llvm/llvm-project/pull/232969

>From 1143b54d74710971ced51f7a82f701666e3609f6 Mon Sep 17 00:00:00 2001
From: Minsoo Choo <minsoo at minsoo.io>
Date: Thu, 10 Sep 2026 10:39:03 -0400
Subject: [PATCH] [lldb] Move register support out of ProcessUtility

---
 lldb/source/CMakeLists.txt                    |   1 +
 .../Plugins/ABI/PowerPC/ABISysV_ppc64.cpp     |   4 +-
 .../ARM64/EmulateInstructionARM64.cpp         |   4 +-
 .../LoongArch/EmulateInstructionLoongArch.cpp |   4 +-
 .../MIPS/EmulateInstructionMIPS.cpp           |   2 +-
 .../MIPS64/EmulateInstructionMIPS64.cpp       |   2 +-
 .../PPC64/EmulateInstructionPPC64.cpp         |   4 +-
 .../RISCV/EmulateInstructionRISCV.cpp         |   8 +-
 .../Instruction/RISCV/RISCVCInstructions.h    |   2 +-
 .../ObjectFile/PECOFF/PECallFrameInfo.cpp     |   2 +-
 .../Plugins/Platform/Linux/PlatformLinux.cpp  |   2 +-
 .../Plugins/Process/AIX/NativeProcessAIX.cpp  |   2 +-
 .../AIX/NativeRegisterContextAIX_ppc64.cpp    |   2 +-
 .../AIX/NativeRegisterContextAIX_ppc64.h      |   4 +-
 .../RegisterContextFreeBSDKernelCore_arm.cpp  |   2 +-
 ...RegisterContextFreeBSDKernelCore_arm64.cpp |   2 +-
 .../ThreadFreeBSDKernelCore.cpp               |  12 +-
 .../NativeRegisterContextFreeBSD_arm.cpp      |   2 +-
 .../NativeRegisterContextFreeBSD_arm.h        |   2 +-
 .../NativeRegisterContextFreeBSD_arm64.cpp    |   4 +-
 .../NativeRegisterContextFreeBSD_arm64.h      |   2 +-
 .../NativeRegisterContextFreeBSD_powerpc.h    |   2 +-
 .../NativeRegisterContextFreeBSD_x86.cpp      |   4 +-
 .../NativeRegisterContextFreeBSD_x86.h        |   4 +-
 .../Linux/NativeRegisterContextLinux_arm.cpp  |   2 +-
 .../Linux/NativeRegisterContextLinux_arm.h    |   4 +-
 .../NativeRegisterContextLinux_arm64.cpp      |   4 +-
 .../Linux/NativeRegisterContextLinux_arm64.h  |   2 +-
 ...NativeRegisterContextLinux_loongarch64.cpp |   4 +-
 .../NativeRegisterContextLinux_loongarch64.h  |   2 +-
 .../NativeRegisterContextLinux_ppc64le.cpp    |   2 +-
 .../NativeRegisterContextLinux_ppc64le.h      |   4 +-
 .../NativeRegisterContextLinux_riscv64.cpp    |   4 +-
 .../NativeRegisterContextLinux_riscv64.h      |   2 +-
 .../NativeRegisterContextLinux_s390x.cpp      |   2 +-
 .../Linux/NativeRegisterContextLinux_s390x.h  |   4 +-
 .../Linux/NativeRegisterContextLinux_x86.cpp  |   4 +-
 .../Linux/NativeRegisterContextLinux_x86.h    |   6 +-
 .../NativeRegisterContextNetBSD_x86.cpp       |   4 +-
 .../NetBSD/NativeRegisterContextNetBSD_x86.h  |   4 +-
 .../Plugins/Process/Utility/CMakeLists.txt    |  36 -----
 .../NativeRegisterContextDBReg_x86.cpp        |   2 +-
 .../NativeRegisterContextRegisterInfo.h       |   2 +-
 .../Utility/RegisterContextDarwin_arm64.cpp   |   2 +-
 .../Utility/RegisterContextPOSIX_arm.h        |   4 +-
 .../Utility/RegisterContextPOSIX_arm64.h      |   4 +-
 .../RegisterContextPOSIX_loongarch64.h        |   6 +-
 .../Utility/RegisterContextPOSIX_powerpc.h    | 125 +----------------
 .../Utility/RegisterContextPOSIX_ppc64le.h    |   4 +-
 .../Utility/RegisterContextPOSIX_riscv32.h    |   6 +-
 .../Utility/RegisterContextPOSIX_riscv64.h    |   6 +-
 .../Utility/RegisterContextPOSIX_s390x.cpp    |   2 +-
 .../Utility/RegisterContextPOSIX_s390x.h      |   6 +-
 .../Utility/RegisterContextPOSIX_x86.cpp      |   2 +-
 .../Utility/RegisterContextPOSIX_x86.h        |   8 +-
 .../NativeRegisterContextWindows_WoW64.cpp    |   2 +-
 .../NativeRegisterContextWindows_WoW64.h      |   4 +-
 .../NativeRegisterContextWindows_arm.cpp      |   2 +-
 .../Common/NativeRegisterContextWindows_arm.h |   2 +-
 .../NativeRegisterContextWindows_arm64.h      |   4 +-
 .../NativeRegisterContextWindows_i386.cpp     |   2 +-
 .../NativeRegisterContextWindows_i386.h       |   4 +-
 .../NativeRegisterContextWindows_x86_64.cpp   |   4 +-
 .../NativeRegisterContextWindows_x86_64.h     |   4 +-
 .../Common/arm/RegisterContextWindows_arm.cpp |   2 +-
 .../arm64/RegisterContextWindows_arm64.cpp    |   2 +-
 .../Common/x64/RegisterContextWindows_x64.cpp |   4 +-
 .../Common/x86/RegisterContextWindows_x86.cpp |   4 +-
 .../RegisterContextPOSIXCore_arm64.cpp        |   4 +-
 .../elf-core/RegisterContextPOSIXCore_arm64.h |   2 +-
 .../RegisterContextPOSIXCore_loongarch64.h    |   2 +-
 .../RegisterContextPOSIXCore_ppc64le.cpp      |   2 +-
 .../RegisterContextPOSIXCore_riscv32.cpp      |   2 +-
 .../RegisterContextPOSIXCore_riscv32.h        |   2 +-
 .../RegisterContextPOSIXCore_riscv64.h        |   2 +-
 .../Process/elf-core/ThreadElfCore.cpp        |  26 ++--
 .../minidump/RegisterContextMinidump_ARM.h    |   2 +-
 .../minidump/RegisterContextMinidump_ARM64.h  |   2 +-
 .../minidump/RegisterContextMinidump_x86_32.h |   4 +-
 .../minidump/RegisterContextMinidump_x86_64.h |   4 +-
 .../Process/minidump/ThreadMinidump.cpp       |   4 +-
 .../NativePDB/CodeViewRegisterMapping.cpp     |   4 +-
 .../Arch}/RegisterContext_mips.h              |   6 +-
 .../Arch}/RegisterContext_powerpc.h           | 127 +++++++++++++++++-
 .../Arch}/RegisterContext_s390x.h             |   4 +-
 .../Arch}/RegisterContext_x86.cpp             |   0
 .../Arch}/RegisterContext_x86.h               |   4 +-
 .../Arch}/RegisterInfos_arm.h                 |   0
 .../Arch}/RegisterInfos_arm64.h               |   0
 .../Arch}/RegisterInfos_arm64_sve.h           |   0
 .../Arch}/RegisterInfos_i386.h                |   0
 .../Arch}/RegisterInfos_loongarch64.h         |   0
 .../Arch}/RegisterInfos_mips.h                |   0
 .../Arch}/RegisterInfos_mips64.h              |   0
 .../Arch}/RegisterInfos_powerpc.h             |   0
 .../Arch}/RegisterInfos_ppc64.h               |   0
 .../Arch}/RegisterInfos_ppc64le.h             |   0
 .../Arch}/RegisterInfos_riscv32.h             |   0
 .../Arch}/RegisterInfos_riscv64.h             |   0
 .../Arch}/RegisterInfos_s390x.h               |   0
 .../Arch}/RegisterInfos_x86_64.h              |   0
 .../Arch}/RegisterInfos_x86_64_with_base.h    |   0
 .../RegisterInfos_x86_64_with_base_shared.cpp |   1 +
 .../RegisterInfos_x86_64_with_base_shared.h   |   4 +-
 .../Arch}/lldb-arm-register-enums.h           |   6 +-
 .../Arch}/lldb-arm64-register-enums.h         |   6 +-
 .../Arch}/lldb-loongarch-register-enums.h     |   6 +-
 .../Arch}/lldb-ppc64-register-enums.h         |   6 +-
 .../Arch}/lldb-ppc64le-register-enums.h       |   6 +-
 .../Arch}/lldb-riscv-register-enums.h         |   6 +-
 .../Arch}/lldb-s390x-register-enums.h         |   6 +-
 .../Arch}/lldb-x86-register-enums.h           |   6 +-
 lldb/source/Register/CMakeLists.txt           |  33 +++++
 .../Common}/RegisterInfoDynamic_riscv32.cpp   |   4 +-
 .../Common}/RegisterInfoDynamic_riscv32.h     |   8 +-
 .../Common}/RegisterInfo_arm.cpp              |   2 +-
 .../Common}/RegisterInfo_arm.h                |   8 +-
 .../Common}/RegisterInfo_arm64.cpp            |   4 +-
 .../Common}/RegisterInfo_arm64.h              |   6 +-
 .../Common}/RegisterInfo_loongarch64.cpp      |   2 +-
 .../Common}/RegisterInfo_loongarch64.h        |   6 +-
 .../Common}/RegisterInfo_ppc64.cpp            |   2 +-
 .../Common}/RegisterInfo_ppc64.h              |   8 +-
 .../Common}/RegisterInfo_ppc64le.cpp          |   2 +-
 .../Common}/RegisterInfo_ppc64le.h            |   6 +-
 .../Common}/RegisterInfo_riscv32.cpp          |   2 +-
 .../Common}/RegisterInfo_riscv32.h            |   6 +-
 .../Common}/RegisterInfo_riscv64.cpp          |   2 +-
 .../Common}/RegisterInfo_riscv64.h            |   6 +-
 .../Common}/RegisterTypeDetector_arm64.cpp    |   0
 .../Common}/RegisterTypeDetector_arm64.h      |   6 +-
 .../FreeBSD}/RegisterInfoFreeBSD_i386.cpp     |   6 +-
 .../FreeBSD}/RegisterInfoFreeBSD_i386.h       |   6 +-
 .../FreeBSD}/RegisterInfoFreeBSD_powerpc.cpp  |   5 +-
 .../FreeBSD}/RegisterInfoFreeBSD_powerpc.h    |   8 +-
 .../FreeBSD}/RegisterInfoFreeBSD_x86_64.cpp   |   8 +-
 .../FreeBSD}/RegisterInfoFreeBSD_x86_64.h     |   6 +-
 .../Linux}/RegisterInfoLinux_i386.cpp         |   6 +-
 .../Linux}/RegisterInfoLinux_i386.h           |   6 +-
 .../Linux}/RegisterInfoLinux_s390x.cpp        |   6 +-
 .../Linux}/RegisterInfoLinux_s390x.h          |   6 +-
 .../Linux}/RegisterInfoLinux_x86.h            |   6 +-
 .../Linux}/RegisterInfoLinux_x86_64.cpp       |   8 +-
 .../Linux}/RegisterInfoLinux_x86_64.h         |   6 +-
 .../NetBSD}/RegisterInfoNetBSD_i386.cpp       |   6 +-
 .../NetBSD}/RegisterInfoNetBSD_i386.h         |   6 +-
 .../NetBSD}/RegisterInfoNetBSD_x86_64.cpp     |   8 +-
 .../NetBSD}/RegisterInfoNetBSD_x86_64.h       |   6 +-
 .../OpenBSD}/RegisterInfoOpenBSD_i386.cpp     |   6 +-
 .../OpenBSD}/RegisterInfoOpenBSD_i386.h       |   6 +-
 .../OpenBSD}/RegisterInfoOpenBSD_x86_64.cpp   |   6 +-
 .../OpenBSD}/RegisterInfoOpenBSD_x86_64.h     |   6 +-
 .../RegisterInfoAndSetInterface.h             |   4 +-
 .../RegisterInfoInterface.h                   |   4 +-
 .../Windows}/RegisterInfoWindows_i386.cpp     |   4 +-
 .../Windows}/RegisterInfoWindows_i386.h       |   6 +-
 .../Windows}/RegisterInfoWindows_x86_64.cpp   |   4 +-
 .../Windows}/RegisterInfoWindows_x86_64.h     |   6 +-
 .../Instruction/ARM64/TestAArch64Emulator.cpp |   4 +-
 .../LoongArch/TestLoongArchEmulator.cpp       |   4 +-
 .../Instruction/RISCV/TestRISCVEmulator.cpp   |   6 +-
 .../RISCV/TestRiscvInstEmulation.cpp          |   2 +-
 .../ObjectFile/PECOFF/TestPECallFrameInfo.cpp |   2 +-
 .../ObjectFile/PECOFF/TestSectionSize.cpp     |   3 +-
 .../Utility/RegisterInfoFreeBSDTest.cpp       |  16 +--
 .../Utility/RegisterInfoNetBSDTest_i386.cpp   |   4 +-
 .../Utility/RegisterInfoNetBSDTest_x86_64.cpp |   6 +-
 .../Process/Utility/RegisterInfo_x86Test.cpp  |   2 +-
 .../minidump/RegisterContextMinidumpTest.cpp  |   4 +-
 .../Symbol/TestDWARFCallFrameInfo.cpp         |   2 +-
 .../ARM64/TestArm64InstEmulation.cpp          |   2 +-
 .../PPC64/TestPPC64InstEmulation.cpp          |   2 +-
 .../source/Plugins/Process/Utility/BUILD.gn   |  40 +-----
 .../secondary/lldb/source/Register/BUILD.gn   |  37 +++++
 174 files changed, 527 insertions(+), 527 deletions(-)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterContext_mips.h (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterContext_powerpc.h (50%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterContext_s390x.h (93%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterContext_x86.cpp (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterContext_x86.h (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_arm.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_arm64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_arm64_sve.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_i386.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_loongarch64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_mips.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_mips64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_powerpc.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_ppc64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_ppc64le.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_riscv32.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_riscv64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_s390x.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_x86_64.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_x86_64_with_base.h (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_x86_64_with_base_shared.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/RegisterInfos_x86_64_with_base_shared.h (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-arm-register-enums.h (94%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-arm64-register-enums.h (95%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-loongarch-register-enums.h (96%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-ppc64-register-enums.h (94%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-ppc64le-register-enums.h (95%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-riscv-register-enums.h (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-s390x-register-enums.h (90%)
 rename lldb/source/{Plugins/Process/Utility => Register/Arch}/lldb-x86-register-enums.h (98%)
 create mode 100644 lldb/source/Register/CMakeLists.txt
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfoDynamic_riscv32.cpp (98%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfoDynamic_riscv32.h (90%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_arm.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_arm.h (89%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_arm64.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_arm64.h (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_loongarch64.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_loongarch64.h (91%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_ppc64.cpp (98%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_ppc64.h (78%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_ppc64le.cpp (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_ppc64le.h (83%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_riscv32.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_riscv32.h (91%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_riscv64.cpp (99%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterInfo_riscv64.h (92%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterTypeDetector_arm64.cpp (100%)
 rename lldb/source/{Plugins/Process/Utility => Register/Common}/RegisterTypeDetector_arm64.h (96%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_i386.cpp (94%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_i386.h (79%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_powerpc.cpp (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_powerpc.h (85%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_x86_64.cpp (95%)
 rename lldb/source/{Plugins/Process/Utility => Register/FreeBSD}/RegisterInfoFreeBSD_x86_64.h (81%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_i386.cpp (96%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_i386.h (80%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_s390x.cpp (92%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_s390x.h (83%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_x86.h (82%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_x86_64.cpp (96%)
 rename lldb/source/{Plugins/Process/Utility => Register/Linux}/RegisterInfoLinux_x86_64.h (82%)
 rename lldb/source/{Plugins/Process/Utility => Register/NetBSD}/RegisterInfoNetBSD_i386.cpp (95%)
 rename lldb/source/{Plugins/Process/Utility => Register/NetBSD}/RegisterInfoNetBSD_i386.h (79%)
 rename lldb/source/{Plugins/Process/Utility => Register/NetBSD}/RegisterInfoNetBSD_x86_64.cpp (96%)
 rename lldb/source/{Plugins/Process/Utility => Register/NetBSD}/RegisterInfoNetBSD_x86_64.h (83%)
 rename lldb/source/{Plugins/Process/Utility => Register/OpenBSD}/RegisterInfoOpenBSD_i386.cpp (93%)
 rename lldb/source/{Plugins/Process/Utility => Register/OpenBSD}/RegisterInfoOpenBSD_i386.h (79%)
 rename lldb/source/{Plugins/Process/Utility => Register/OpenBSD}/RegisterInfoOpenBSD_x86_64.cpp (95%)
 rename lldb/source/{Plugins/Process/Utility => Register/OpenBSD}/RegisterInfoOpenBSD_x86_64.h (81%)
 rename lldb/source/{Plugins/Process/Utility => Register}/RegisterInfoAndSetInterface.h (87%)
 rename lldb/source/{Plugins/Process/Utility => Register}/RegisterInfoInterface.h (91%)
 rename lldb/source/{Plugins/Process/Utility => Register/Windows}/RegisterInfoWindows_i386.cpp (97%)
 rename lldb/source/{Plugins/Process/Utility => Register/Windows}/RegisterInfoWindows_i386.h (80%)
 rename lldb/source/{Plugins/Process/Utility => Register/Windows}/RegisterInfoWindows_x86_64.cpp (98%)
 rename lldb/source/{Plugins/Process/Utility => Register/Windows}/RegisterInfoWindows_x86_64.h (80%)
 create mode 100644 llvm/utils/gn/secondary/lldb/source/Register/BUILD.gn

diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt
index ae02227ca3578..4125f32197b26 100644
--- a/lldb/source/CMakeLists.txt
+++ b/lldb/source/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory(Expression)
 add_subdirectory(Host)
 add_subdirectory(Initialization)
 add_subdirectory(Interpreter)
+add_subdirectory(Register)
 add_subdirectory(Plugins)
 add_subdirectory(Protocol)
 add_subdirectory(Symbol)
diff --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
index 0895cd3d75df6..3c2b391cfb869 100644
--- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
+++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
@@ -38,11 +38,11 @@
 #include "clang/AST/Decl.h"
 
 #define DECLARE_REGISTER_INFOS_PPC64_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64.h"
+#include "Register/Arch/RegisterInfos_ppc64.h"
 #undef DECLARE_REGISTER_INFOS_PPC64_STRUCT
 
 #define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64le.h"
+#include "Register/Arch/RegisterInfos_ppc64le.h"
 #undef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
 #include <optional>
 
diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index 4ef62bbfa2bc7..78c51531260a8 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -19,7 +19,7 @@
 
 #include "Plugins/Process/Utility/ARMDefines.h"
 #include "Plugins/Process/Utility/ARMUtils.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
 
 #include <algorithm>
 #include <cstdlib>
@@ -40,7 +40,7 @@
 
 #define DECLARE_REGISTER_INFOS_ARM64_STRUCT
 
-#include "Plugins/Process/Utility/RegisterInfos_arm64.h"
+#include "Register/Arch/RegisterInfos_arm64.h"
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/MathExtras.h"
diff --git a/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp b/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
index 44dfe82d6b6cd..adeb57a57de45 100644
--- a/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
+++ b/lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp
@@ -11,8 +11,8 @@
 
 #include "EmulateInstructionLoongArch.h"
 #include "Plugins/Process/Utility/InstructionUtils.h"
-#include "Plugins/Process/Utility/RegisterInfo_loongarch64.h"
-#include "Plugins/Process/Utility/lldb-loongarch-register-enums.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
+#include "Register/Arch/lldb-loongarch-register-enums.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Interpreter/OptionValueArray.h"
diff --git a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
index deaa2fdadd22e..de158426064b9 100644
--- a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
+++ b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
@@ -36,7 +36,7 @@
 #include "llvm/ADT/STLExtras.h"
 
 #include "Plugins/Process/Utility/InstructionUtils.h"
-#include "Plugins/Process/Utility/RegisterContext_mips.h"
+#include "Register/Arch/RegisterContext_mips.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
index 57f04fb8d19b7..7d2ebd15632d0 100644
--- a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
+++ b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
@@ -36,7 +36,7 @@
 #include "llvm/ADT/STLExtras.h"
 
 #include "Plugins/Process/Utility/InstructionUtils.h"
-#include "Plugins/Process/Utility/RegisterContext_mips.h"
+#include "Register/Arch/RegisterContext_mips.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
index 29516c57d2a20..299b61f774132 100644
--- a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
+++ b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
@@ -11,7 +11,7 @@
 #include <cstdlib>
 #include <optional>
 
-#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
+#include "Register/Arch/lldb-ppc64le-register-enums.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Utility/ArchSpec.h"
@@ -19,7 +19,7 @@
 #include "lldb/Utility/LLDBLog.h"
 
 #define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64le.h"
+#include "Register/Arch/RegisterInfos_ppc64le.h"
 
 #include "Plugins/Process/Utility/InstructionUtils.h"
 
diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index c944d37e634f4..af2c1520720b4 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -7,10 +7,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "EmulateInstructionRISCV.h"
-#include "Plugins/Process/Utility/RegisterInfoInterface.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv32.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_riscv32.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "RISCVCInstructions.h"
 #include "RISCVInstructions.h"
 
diff --git a/lldb/source/Plugins/Instruction/RISCV/RISCVCInstructions.h b/lldb/source/Plugins/Instruction/RISCV/RISCVCInstructions.h
index 54140703d7049..fee0da0b0c282 100644
--- a/lldb/source/Plugins/Instruction/RISCV/RISCVCInstructions.h
+++ b/lldb/source/Plugins/Instruction/RISCV/RISCVCInstructions.h
@@ -12,7 +12,7 @@
 #include <cstdint>
 #include <variant>
 
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "RISCVInstructions.h"
 
 namespace lldb_private {
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp
index 4b516b2e954bd..6a312b39057e5 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp
@@ -2,7 +2,7 @@
 
 #include "ObjectFilePECOFF.h"
 
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "llvm/Support/Win64EH.h"
 
diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index eda300b21b981..dab63b6becf7c 100644
--- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -15,7 +15,7 @@
 #endif
 
 #include "Plugins/Process/Utility/LinuxSignals.h"
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "Utility/ARM64_DWARF_Registers.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/PluginManager.h"
diff --git a/lldb/source/Plugins/Process/AIX/NativeProcessAIX.cpp b/lldb/source/Plugins/Process/AIX/NativeProcessAIX.cpp
index 6d99c22857549..cfc78219dcd87 100644
--- a/lldb/source/Plugins/Process/AIX/NativeProcessAIX.cpp
+++ b/lldb/source/Plugins/Process/AIX/NativeProcessAIX.cpp
@@ -27,7 +27,7 @@
 #include <sys/ptrace.h>
 #include <unistd.h>
 #define DECLARE_REGISTER_INFOS_PPC64_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64.h"
+#include "Register/Arch/RegisterInfos_ppc64.h"
 #undef DECLARE_REGISTER_INFOS_PPC64_STRUCT
 
 using namespace lldb;
diff --git a/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp b/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.cpp
index af54c30012448..a3dbf6d716f75 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/RegisterInfo_ppc64.h"
+#include "Register/Common/RegisterInfo_ppc64.h"
 #include "lldb/Utility/RegisterValue.h"
 
 using namespace lldb;
diff --git a/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.h b/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.h
index aa0a6b8549900..c61d3133abdb8 100644
--- a/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.h
+++ b/lldb/source/Plugins/Process/AIX/NativeRegisterContextAIX_ppc64.h
@@ -12,10 +12,10 @@
 #define LLDB_SOURCE_PLUGINS_PROCESS_AIX_NATIVEREGISTERCONTEXTAIX_PPC64_H
 
 #include "Plugins/Process/AIX/NativeRegisterContextAIX.h"
-#include "Plugins/Process/Utility/lldb-ppc64-register-enums.h"
+#include "Register/Arch/lldb-ppc64-register-enums.h"
 
 #define DECLARE_REGISTER_INFOS_PPC64_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64.h"
+#include "Register/Arch/RegisterInfos_ppc64.h"
 #undef DECLARE_REGISTER_INFOS_PPC64_STRUCT
 
 namespace lldb_private {
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 7bbe86b418afc..f06f80fd33ce1 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterContextFreeBSDKernelCore_arm.h"
-#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
+#include "Register/Arch/lldb-arm-register-enums.h"
 
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
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 68d3ea220daa9..aaadd1a0c66f7 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/RegisterContextFreeBSDKernelCore_arm64.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterContextFreeBSDKernelCore_arm64.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
 
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/Process.h"
diff --git a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
index d441be2f6ea92..8e0e6965b128a 100644
--- a/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD-Kernel-Core/ThreadFreeBSDKernelCore.cpp
@@ -12,12 +12,12 @@
 #include "lldb/Target/Unwind.h"
 #include "lldb/Utility/Log.h"
 
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_ppc64le.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_i386.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h"
+#include "Register/Common/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterInfo_ppc64le.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
 #include "ProcessFreeBSDKernelCore.h"
 #include "RegisterContextFreeBSDKernelCore_arm.h"
 #include "RegisterContextFreeBSDKernelCore_arm64.h"
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.cpp
index 4653ad4c201a0..3f231ba173de4 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/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm.h"
 
 // clang-format off
 #include <sys/param.h>
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm.h
index 73df33e433f78..3b12b96e1c290 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/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm.h"
 
 #include <array>
 
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
index 6586f34228fd9..5220f18d42878 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp
@@ -16,8 +16,8 @@
 
 #include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/RegisterTypeDetector_arm64.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterTypeDetector_arm64.h"
 
 // clang-format off
 #include <sys/param.h>
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
index 0633be4ed68a2..5828af59a84ea 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h
@@ -19,7 +19,7 @@
 
 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterInfo_arm64.h"
 
 #include <array>
 
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
index b0dcec4575de9..632393704c829 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
@@ -17,7 +17,7 @@
 // clang-format on
 
 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h"
 
 #include <array>
 #include <optional>
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.cpp
index 50cea232972ce..3359c59f88d8e 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.cpp
@@ -23,8 +23,8 @@
 #include "lldb/Utility/Status.h"
 
 #include "NativeProcessFreeBSD.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_i386.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h"
 #include <optional>
 
 using namespace lldb_private;
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.h
index cd519691eb5ad..9d86935d13c32 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86.h
@@ -23,8 +23,8 @@
 
 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h"
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #define LLDB_INVALID_XSAVE_OFFSET UINT32_MAX
 
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
index 231b3401d21ec..cc8a09518be15 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
@@ -13,7 +13,7 @@
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
index 66f3087d72932..d4dbf920ea64a 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
@@ -13,8 +13,8 @@
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_arm.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
-#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
+#include "Register/Common/RegisterInfo_arm.h"
+#include "Register/Arch/lldb-arm-register-enums.h"
 
 namespace lldb_private {
 namespace process_linux {
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index b236dd49a28bf..83edc252a72c6 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -16,8 +16,8 @@
 #include "Plugins/Process/Linux/Procfs.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "Plugins/Process/Utility/MemoryTagManagerAArch64MTE.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/RegisterTypeDetector_arm64.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterTypeDetector_arm64.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/common/NativeProcessProtocol.h"
 #include "lldb/Utility/DataBufferHeap.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
index e5fcd1d5373ae..163ea7c686606 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
@@ -14,7 +14,7 @@
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
 #include "Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterInfo_arm64.h"
 
 #include "llvm/ADT/BitmaskEnum.h"
 
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
index d7a93bcdbabdb..42fd5c0373ea1 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
@@ -12,8 +12,8 @@
 
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
-#include "Plugins/Process/Utility/RegisterInfo_loongarch64.h"
-#include "Plugins/Process/Utility/lldb-loongarch-register-enums.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
+#include "Register/Arch/lldb-loongarch-register-enums.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h
index a1e6857a34e5b..d2367cb455b74 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h
@@ -13,7 +13,7 @@
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_loongarch.h"
-#include "Plugins/Process/Utility/RegisterInfo_loongarch64.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
 
 #include <asm/ptrace.h>
 
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
index 093ac62a314f8..9c9c252c4c40c 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
@@ -16,7 +16,7 @@
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
-#include "Plugins/Process/Utility/RegisterInfo_ppc64le.h"
+#include "Register/Common/RegisterInfo_ppc64le.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/common/NativeProcessProtocol.h"
 #include "lldb/Utility/DataBufferHeap.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
index 4ca9d43a24926..d8ad09e8dc511 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
@@ -15,10 +15,10 @@
 #define lldb_NativeRegisterContextLinux_ppc64le_h
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
-#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
+#include "Register/Arch/lldb-ppc64le-register-enums.h"
 
 #define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_ppc64le.h"
+#include "Register/Arch/RegisterInfos_ppc64le.h"
 #undef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
 
 namespace lldb_private {
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp
index 238be9f6157de..25487b8497ca3 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp
@@ -12,8 +12,8 @@
 
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/Procfs.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h
index e518a3ff01d3b..cf2621fe5efc0 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.h
@@ -12,7 +12,7 @@
 #define lldb_NativeRegisterContextLinux_riscv64_h
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
 
 #include <asm/ptrace.h>
 
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
index 1851eb21c6351..d56fe891d3792 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
@@ -10,7 +10,7 @@
 
 #include "NativeRegisterContextLinux_s390x.h"
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_s390x.h"
+#include "Register/Linux/RegisterInfoLinux_s390x.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
index 4b97fc89c3482..23ea6db981241 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
@@ -12,8 +12,8 @@
 #define lldb_NativeRegisterContextLinux_s390x_h
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
-#include "Plugins/Process/Utility/RegisterContext_s390x.h"
-#include "Plugins/Process/Utility/lldb-s390x-register-enums.h"
+#include "Register/Arch/RegisterContext_s390x.h"
+#include "Register/Arch/lldb-s390x-register-enums.h"
 #include <asm/ptrace.h>
 
 namespace lldb_private {
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
index 1ab29f277b70a..0d6356c75bd50 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.cpp
@@ -12,8 +12,8 @@
 
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #include "Plugins/Process/Linux/NativeThreadLinux.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86_64.h"
+#include "Register/Linux/RegisterInfoLinux_i386.h"
+#include "Register/Linux/RegisterInfoLinux_x86_64.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.h b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.h
index 9279311893910..b58ae5bebe95f 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.h
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86.h
@@ -13,9 +13,9 @@
 
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86.h"
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Linux/RegisterInfoLinux_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include <optional>
 #include <sys/uio.h>
 
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.cpp
index 55f13bda25ce2..b8f7bffbbf69f 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.cpp
@@ -16,8 +16,8 @@
 #include "lldb/Utility/RegisterValue.h"
 #include "lldb/Utility/Status.h"
 
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_i386.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_x86_64.h"
 
 // clang-format off
 #include <sys/types.h>
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.h b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.h
index 10f11bd92db82..dba5ac78f67d3 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.h
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86.h
@@ -22,9 +22,9 @@
 #include <optional>
 
 #include "Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h"
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 namespace lldb_private {
 namespace process_netbsd {
diff --git a/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
index d6e67a92368e5..19a65bfa4fde1 100644
--- a/lldb/source/Plugins/Process/Utility/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
@@ -1,43 +1,7 @@
 # TODO: Clean up this directory and its dependencies
 set_property(DIRECTORY PROPERTY LLDB_PLUGIN_KIND ProcessUtility)
 
-add_lldb_library(lldbRegister NO_PLUGIN_DEPENDENCIES
-  PARTIAL_SOURCES_INTENDED
-  RegisterContext_x86.cpp
-  RegisterInfoFreeBSD_i386.cpp
-  RegisterInfoFreeBSD_powerpc.cpp
-  RegisterInfoFreeBSD_x86_64.cpp
-  RegisterInfoLinux_i386.cpp
-  RegisterInfoLinux_x86_64.cpp
-  RegisterInfoLinux_s390x.cpp
-  RegisterInfoNetBSD_i386.cpp
-  RegisterInfoNetBSD_x86_64.cpp
-  RegisterInfoOpenBSD_i386.cpp
-  RegisterInfoOpenBSD_x86_64.cpp
-  RegisterInfoWindows_i386.cpp
-  RegisterInfoWindows_x86_64.cpp
-  RegisterTypeDetector_arm64.cpp
-  RegisterInfos_x86_64_with_base_shared.cpp
-  RegisterInfo_arm.cpp
-  RegisterInfo_arm64.cpp
-  RegisterInfo_loongarch64.cpp
-  RegisterInfo_ppc64le.cpp
-  RegisterInfo_ppc64.cpp
-  RegisterInfo_riscv32.cpp
-  RegisterInfo_riscv64.cpp
-  RegisterInfoDynamic_riscv32.cpp
-
-  LINK_COMPONENTS
-    Support
-    TargetParser
-  LINK_LIBS
-    lldbUtility
-  ALLOWED_INTERNAL_DEPENDENCIES
-    lldbUtility
-  )
-
 add_lldb_library(lldbPluginProcessUtility
-  PARTIAL_SOURCES_INTENDED
   AuxVector.cpp
   FreeBSDSignals.cpp
   GDBRemoteSignals.cpp
diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.cpp b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.cpp
index 3038cbcb72371..ed927691629e8 100644
--- a/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.cpp
+++ b/lldb/source/Plugins/Process/Utility/NativeRegisterContextDBReg_x86.cpp
@@ -10,7 +10,7 @@
 #include "lldb/Utility/LLDBLog.h"
 #include "lldb/Utility/RegisterValue.h"
 
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 using namespace lldb_private;
 
diff --git a/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h b/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h
index 58a2a4843e4ec..31ad12dc9fd7e 100644
--- a/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h
+++ b/lldb/source/Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h
@@ -11,7 +11,7 @@
 
 #include <memory>
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 #include "lldb/Host/common/NativeRegisterContext.h"
 
 namespace lldb_private {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
index 43338c8cbc792..0b30d3f3fa817 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
@@ -67,7 +67,7 @@ using namespace lldb_private;
 
 // Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
 #define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "RegisterInfos_arm64.h"
+#include "Register/Arch/RegisterInfos_arm64.h"
 #undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
 
 // General purpose registers
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
index 9dfde5bc0b6ee..555af0b422866 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h
@@ -9,8 +9,8 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM_H
 
-#include "RegisterInfoInterface.h"
-#include "RegisterInfo_arm.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_arm.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
index 581861d83f374..08e20e3000b1d 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h
@@ -9,8 +9,8 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM64_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_ARM64_H
 
-#include "RegisterInfoInterface.h"
-#include "RegisterInfo_arm64.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_arm64.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h
index 20bd7bf4f9aa7..4c07b260c1182 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h
@@ -9,9 +9,9 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_LOONGARCH64_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_LOONGARCH64_H
 
-#include "RegisterInfoInterface.h"
-#include "RegisterInfo_loongarch64.h"
-#include "lldb-loongarch-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
+#include "Register/Arch/lldb-loongarch-register-enums.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
index 5dd8c890da6ed..7172c8c5dd466 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h
@@ -9,132 +9,11 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_POWERPC_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_POWERPC_H
 
-#include "RegisterContext_powerpc.h"
-#include "RegisterInfoInterface.h"
+#include "Register/Arch/RegisterContext_powerpc.h"
+#include "Register/RegisterInfoInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
-// Internal codes for all powerpc registers.
-enum {
-  k_first_gpr_powerpc,
-  gpr_r0_powerpc = k_first_gpr_powerpc,
-  gpr_r1_powerpc,
-  gpr_r2_powerpc,
-  gpr_r3_powerpc,
-  gpr_r4_powerpc,
-  gpr_r5_powerpc,
-  gpr_r6_powerpc,
-  gpr_r7_powerpc,
-  gpr_r8_powerpc,
-  gpr_r9_powerpc,
-  gpr_r10_powerpc,
-  gpr_r11_powerpc,
-  gpr_r12_powerpc,
-  gpr_r13_powerpc,
-  gpr_r14_powerpc,
-  gpr_r15_powerpc,
-  gpr_r16_powerpc,
-  gpr_r17_powerpc,
-  gpr_r18_powerpc,
-  gpr_r19_powerpc,
-  gpr_r20_powerpc,
-  gpr_r21_powerpc,
-  gpr_r22_powerpc,
-  gpr_r23_powerpc,
-  gpr_r24_powerpc,
-  gpr_r25_powerpc,
-  gpr_r26_powerpc,
-  gpr_r27_powerpc,
-  gpr_r28_powerpc,
-  gpr_r29_powerpc,
-  gpr_r30_powerpc,
-  gpr_r31_powerpc,
-  gpr_lr_powerpc,
-  gpr_cr_powerpc,
-  gpr_xer_powerpc,
-  gpr_ctr_powerpc,
-  gpr_pc_powerpc,
-  k_last_gpr_powerpc = gpr_pc_powerpc,
-
-  k_first_fpr,
-  fpr_f0_powerpc = k_first_fpr,
-  fpr_f1_powerpc,
-  fpr_f2_powerpc,
-  fpr_f3_powerpc,
-  fpr_f4_powerpc,
-  fpr_f5_powerpc,
-  fpr_f6_powerpc,
-  fpr_f7_powerpc,
-  fpr_f8_powerpc,
-  fpr_f9_powerpc,
-  fpr_f10_powerpc,
-  fpr_f11_powerpc,
-  fpr_f12_powerpc,
-  fpr_f13_powerpc,
-  fpr_f14_powerpc,
-  fpr_f15_powerpc,
-  fpr_f16_powerpc,
-  fpr_f17_powerpc,
-  fpr_f18_powerpc,
-  fpr_f19_powerpc,
-  fpr_f20_powerpc,
-  fpr_f21_powerpc,
-  fpr_f22_powerpc,
-  fpr_f23_powerpc,
-  fpr_f24_powerpc,
-  fpr_f25_powerpc,
-  fpr_f26_powerpc,
-  fpr_f27_powerpc,
-  fpr_f28_powerpc,
-  fpr_f29_powerpc,
-  fpr_f30_powerpc,
-  fpr_f31_powerpc,
-  fpr_fpscr_powerpc,
-  k_last_fpr = fpr_fpscr_powerpc,
-
-  k_first_vmx,
-  vmx_v0_powerpc = k_first_vmx,
-  vmx_v1_powerpc,
-  vmx_v2_powerpc,
-  vmx_v3_powerpc,
-  vmx_v4_powerpc,
-  vmx_v5_powerpc,
-  vmx_v6_powerpc,
-  vmx_v7_powerpc,
-  vmx_v8_powerpc,
-  vmx_v9_powerpc,
-  vmx_v10_powerpc,
-  vmx_v11_powerpc,
-  vmx_v12_powerpc,
-  vmx_v13_powerpc,
-  vmx_v14_powerpc,
-  vmx_v15_powerpc,
-  vmx_v16_powerpc,
-  vmx_v17_powerpc,
-  vmx_v18_powerpc,
-  vmx_v19_powerpc,
-  vmx_v20_powerpc,
-  vmx_v21_powerpc,
-  vmx_v22_powerpc,
-  vmx_v23_powerpc,
-  vmx_v24_powerpc,
-  vmx_v25_powerpc,
-  vmx_v26_powerpc,
-  vmx_v27_powerpc,
-  vmx_v28_powerpc,
-  vmx_v29_powerpc,
-  vmx_v30_powerpc,
-  vmx_v31_powerpc,
-  vmx_vrsave_powerpc,
-  vmx_vscr_powerpc,
-  k_last_vmx = vmx_vscr_powerpc,
-
-  k_num_registers_powerpc,
-  k_num_gpr_registers_powerpc = k_last_gpr_powerpc - k_first_gpr_powerpc + 1,
-  k_num_fpr_registers_powerpc = k_last_fpr - k_first_fpr + 1,
-  k_num_vmx_registers_powerpc = k_last_vmx - k_first_vmx + 1,
-};
-
 class RegisterContextPOSIX_powerpc : public lldb_private::RegisterContext {
 public:
   RegisterContextPOSIX_powerpc(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h
index 66794ec9e9cab..8553f829277c6 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.h
@@ -9,8 +9,8 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_PPC64LE_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_PPC64LE_H
 
-#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
-#include "RegisterInfoInterface.h"
+#include "Register/Arch/lldb-ppc64le-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
 #include "Utility/PPC64LE_DWARF_Registers.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.h
index d8d77905a1ba8..4a73ba159b671 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv32.h
@@ -9,9 +9,9 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_RISCV32_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_RISCV32_H
 
-#include "RegisterInfoInterface.h"
-#include "RegisterInfo_riscv32.h"
-#include "lldb-riscv-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_riscv32.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h
index e8c8a3f837c6c..8f52dc8697ee4 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h
@@ -9,9 +9,9 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_RISCV64_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_RISCV64_H
 
-#include "RegisterInfoInterface.h"
-#include "RegisterInfo_riscv64.h"
-#include "lldb-riscv-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp
index b85da39b4c45c..c3cbea2b5be64 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp
@@ -21,7 +21,7 @@
 #include "llvm/Support/Compiler.h"
 
 #include "RegisterContextPOSIX_s390x.h"
-#include "RegisterContext_s390x.h"
+#include "Register/Arch/RegisterContext_s390x.h"
 
 using namespace lldb_private;
 using namespace lldb;
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h
index 7027af04f0bb2..8c23f23574646 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h
@@ -9,9 +9,9 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_S390X_H
 
-#include "RegisterContext_s390x.h"
-#include "RegisterInfoInterface.h"
-#include "lldb-s390x-register-enums.h"
+#include "Register/Arch/RegisterContext_s390x.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Arch/lldb-s390x-register-enums.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
index 96640bceaea62..96abe5cc0eb72 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp
@@ -21,7 +21,7 @@
 #include "llvm/Support/Compiler.h"
 
 #include "RegisterContextPOSIX_x86.h"
-#include "RegisterContext_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
 
 using namespace lldb_private;
 using namespace lldb;
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
index 2bee8f638c2da..68f1cf1c8e702 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h
@@ -9,10 +9,10 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_X86_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTPOSIX_X86_H
 
-#include "RegisterContext_x86.h"
-#include "RegisterInfoInterface.h"
-#include "RegisterInfos_x86_64_with_base_shared.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Arch/RegisterInfos_x86_64_with_base_shared.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Log.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
index b188bf979a01b..f6a155f9ba8f9 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
@@ -11,7 +11,7 @@
 #include "NativeRegisterContextWindows_WoW64.h"
 
 #include "NativeThreadWindows.h"
-#include "Plugins/Process/Utility/RegisterInfoWindows_i386.h"
+#include "Register/Windows/RegisterInfoWindows_i386.h"
 #include "ProcessWindowsLog.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostThread.h"
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
index 213826ac7feda..fa22c59f7c3ac 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
@@ -10,8 +10,8 @@
 #ifndef liblldb_NativeRegisterContextWindows_WoW64_h_
 #define liblldb_NativeRegisterContextWindows_WoW64_h_
 
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "NativeRegisterContextWindows.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
index 2d396f4f0ea3c..75f42eb98ce4f 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
@@ -10,7 +10,7 @@
 
 #include "NativeRegisterContextWindows_arm.h"
 #include "NativeThreadWindows.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm.h"
 #include "ProcessWindowsLog.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostThread.h"
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
index d8e8e81dde13d..62464c60e253e 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
@@ -10,7 +10,7 @@
 #ifndef liblldb_NativeRegisterContextWindows_arm_h_
 #define liblldb_NativeRegisterContextWindows_arm_h_
 
-#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
+#include "Register/Arch/lldb-arm-register-enums.h"
 
 #include "NativeRegisterContextWindows.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
index 3970626b3631a..3824fc227f4f4 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
@@ -13,8 +13,8 @@
 #include "NativeRegisterContextWindows.h"
 
 #include "Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
 
 #include "lldb/Host/windows/windows.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
index 940ae503a97c8..563d54385f080 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
@@ -11,7 +11,7 @@
 #include "NativeRegisterContextWindows_i386.h"
 
 #include "NativeThreadWindows.h"
-#include "Plugins/Process/Utility/RegisterInfoWindows_i386.h"
+#include "Register/Windows/RegisterInfoWindows_i386.h"
 #include "ProcessWindowsLog.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostThread.h"
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
index 325fbc35d3482..be589fc6992cd 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
@@ -10,8 +10,8 @@
 #ifndef liblldb_NativeRegisterContextWindows_i386_h_
 #define liblldb_NativeRegisterContextWindows_i386_h_
 
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "NativeRegisterContextWindows.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
index 0695a42fc1848..bb244e4ac1a63 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
@@ -11,8 +11,8 @@
 #include "NativeRegisterContextWindows_x86_64.h"
 #include "NativeRegisterContextWindows_WoW64.h"
 #include "NativeThreadWindows.h"
-#include "Plugins/Process/Utility/RegisterInfoWindows_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoWindows_x86_64.h"
+#include "Register/Windows/RegisterInfoWindows_i386.h"
+#include "Register/Windows/RegisterInfoWindows_x86_64.h"
 #include "ProcessWindowsLog.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostThread.h"
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
index 1eea8fbaa2e1c..52bc708521057 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
@@ -10,8 +10,8 @@
 #ifndef liblldb_NativeRegisterContextWindows_x86_64_h_
 #define liblldb_NativeRegisterContextWindows_x86_64_h_
 
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "NativeRegisterContextWindows.h"
 
diff --git a/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp b/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp
index a31a299c33789..1c2a7b77f16cd 100644
--- a/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp
@@ -38,7 +38,7 @@ using namespace lldb_private;
 
 // Include RegisterInfos_arm to declare our g_register_infos_arm structure.
 #define DECLARE_REGISTER_INFOS_ARM_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_arm.h"
+#include "Register/Arch/RegisterInfos_arm.h"
 #undef DECLARE_REGISTER_INFOS_ARM_STRUCT
 
 static size_t k_num_register_infos = std::size(g_register_infos_arm);
diff --git a/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp b/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp
index 33bb0712d4b5e..38ebf8fb80466 100644
--- a/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp
@@ -39,7 +39,7 @@ using namespace lldb_private;
 
 // Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
 #define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_arm64.h"
+#include "Register/Arch/RegisterInfos_arm64.h"
 #undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
 
 static size_t k_num_register_infos = std::size(g_register_infos_arm64_le);
diff --git a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
index ae1e7a47e92bc..25d7bdbc81b10 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -14,8 +14,8 @@
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-private-types.h"
 
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "ProcessWindowsLog.h"
 #include "RegisterContextWindows_x64.h"
 #include "TargetThreadWindows.h"
diff --git a/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp b/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
index 3613120f5e3b9..4d3ef9588b09d 100644
--- a/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
@@ -16,9 +16,9 @@
 
 #include "ProcessWindowsLog.h"
 #include "RegisterContextWindows_x86.h"
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
 #include "TargetThreadWindows.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "llvm/ADT/STLExtras.h"
 
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
index 5e9464674bfe7..e7ae3ca40fe22 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
@@ -7,10 +7,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterContextPOSIXCore_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterInfo_arm64.h"
 
 #include "Plugins/Process/Utility/AuxVector.h"
-#include "Plugins/Process/Utility/RegisterTypeDetector_arm64.h"
+#include "Register/Common/RegisterTypeDetector_arm64.h"
 #include "Plugins/Process/elf-core/ProcessElfCore.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Target/Thread.h"
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
index 39778e5a20d6c..a86f3f0317925 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h
@@ -11,7 +11,7 @@
 
 #include "Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h"
-#include "Plugins/Process/Utility/RegisterTypeDetector_arm64.h"
+#include "Register/Common/RegisterTypeDetector_arm64.h"
 
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Utility/DataBufferHeap.h"
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.h
index b17f39d622681..fd2e5b1c11abb 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.h
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_loongarch64.h
@@ -10,7 +10,7 @@
 #define LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_LOONGARCH64_H
 
 #include "Plugins/Process/Utility/RegisterContextPOSIX_loongarch64.h"
-#include "Plugins/Process/Utility/RegisterInfo_loongarch64.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
 
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Target/Thread.h"
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
index d44fb399e18a7..4f0f46b2213c4 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
@@ -12,7 +12,7 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/RegisterValue.h"
 
-#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
+#include "Register/Arch/lldb-ppc64le-register-enums.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 
 #include <memory>
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp
index 1e87a5cc4cca0..f4ea112e2a11f 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.cpp
@@ -20,7 +20,7 @@
 #define FPR_OFFSET(idx) ((idx) * sizeof(uint32_t))
 
 #define DECLARE_REGISTER_INFOS_RISCV32_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_riscv32.h"
+#include "Register/Arch/RegisterInfos_riscv32.h"
 #undef DECLARE_REGISTER_INFOS_RISCV32_STRUCT
 
 using namespace lldb_private;
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.h
index e1c942d14ff4a..29d540c6185bc 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.h
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv32.h
@@ -9,7 +9,7 @@
 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_RISCV32_H
 #define LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_RISCV32_H
 
-#include "Plugins/Process/Utility/RegisterInfoDynamic_riscv32.h"
+#include "Register/Common/RegisterInfoDynamic_riscv32.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/DataExtractor.h"
diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.h
index c28eff900e6a1..43938875693fb 100644
--- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.h
+++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_riscv64.h
@@ -10,7 +10,7 @@
 #define LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_RISCV64_H
 
 #include "Plugins/Process/Utility/RegisterContextPOSIX_riscv64.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
 
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Target/Thread.h"
diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
index 992c188810c7e..152e78db76567 100644
--- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -16,19 +16,19 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/ProcessInfo.h"
 
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_s390x.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfoOpenBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/RegisterInfo_ppc64le.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_i386.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h"
+#include "Register/Linux/RegisterInfoLinux_i386.h"
+#include "Register/Linux/RegisterInfoLinux_s390x.h"
+#include "Register/Linux/RegisterInfoLinux_x86_64.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_i386.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_x86_64.h"
+#include "Register/OpenBSD/RegisterInfoOpenBSD_i386.h"
+#include "Register/OpenBSD/RegisterInfoOpenBSD_x86_64.h"
+#include "Register/Common/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Common/RegisterInfo_ppc64le.h"
 #include "ProcessElfCore.h"
 #include "RegisterContextLinuxCore_x86.h"
 #include "RegisterContextPOSIXCore_arm.h"
diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
index 857f9c0a37674..07388cbe0f65f 100644
--- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
+++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
@@ -11,7 +11,7 @@
 
 #include "MinidumpTypes.h"
 
-#include "Plugins/Process/Utility/RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 #include "lldb/Target/RegisterContext.h"
 
diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h
index 58cf8d62fb865..e761fda93b67f 100644
--- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h
+++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.h
@@ -11,7 +11,7 @@
 
 #include "MinidumpTypes.h"
 
-#include "Plugins/Process/Utility/RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 #include "lldb/Target/RegisterContext.h"
 
 #include "llvm/ADT/ArrayRef.h"
diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h
index 4dffc4f9db0eb..5599843771bcb 100644
--- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h
+++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_32.h
@@ -11,8 +11,8 @@
 
 #include "MinidumpTypes.h"
 
-#include "Plugins/Process/Utility/RegisterInfoInterface.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "lldb/Target/RegisterContext.h"
 
diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h
index f8d38e4ba5378..09fbde77a06e0 100644
--- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h
+++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_x86_64.h
@@ -11,8 +11,8 @@
 
 #include "MinidumpTypes.h"
 
-#include "Plugins/Process/Utility/RegisterInfoInterface.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/RegisterInfoInterface.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 #include "lldb/Target/RegisterContext.h"
 
diff --git a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp
index 270dded14cf3b..905fb9348ab9b 100644
--- a/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ThreadMinidump.cpp
@@ -15,8 +15,8 @@
 #include "RegisterContextMinidump_x86_32.h"
 #include "RegisterContextMinidump_x86_64.h"
 
-#include "Plugins/Process/Utility/RegisterInfoLinux_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86_64.h"
+#include "Register/Linux/RegisterInfoLinux_i386.h"
+#include "Register/Linux/RegisterInfoLinux_x86_64.h"
 #include "Plugins/Process/elf-core/RegisterContextPOSIXCore_x86.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
index 3c10d4aa314b2..44d5ff84a9b3e 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp
@@ -10,8 +10,8 @@
 
 #include "lldb/lldb-defines.h"
 
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 using namespace lldb_private;
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_mips.h b/lldb/source/Register/Arch/RegisterContext_mips.h
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterContext_mips.h
rename to lldb/source/Register/Arch/RegisterContext_mips.h
index 15081f974c667..07e0add1f1c1c 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_mips.h
+++ b/lldb/source/Register/Arch/RegisterContext_mips.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_MIPS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_MIPS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_MIPS_H
+#define LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_MIPS_H
 
 #include <cstddef>
 #include <cstdint>
@@ -371,4 +371,4 @@ struct UserArea {
   MSA_linux_mips msa; // MSA registers.
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_MIPS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_MIPS_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h b/lldb/source/Register/Arch/RegisterContext_powerpc.h
similarity index 50%
rename from lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h
rename to lldb/source/Register/Arch/RegisterContext_powerpc.h
index 7407e2f402e08..070e5e1f10ccd 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_powerpc.h
+++ b/lldb/source/Register/Arch/RegisterContext_powerpc.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_POWERPC_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_POWERPC_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_POWERPC_H
+#define LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_POWERPC_H
 
 // eh_frame and DWARF Register numbers (eRegisterKindEHFrame &
 // eRegisterKindDWARF)
@@ -120,4 +120,125 @@ enum {
   dwarf_v31_powerpc,
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_POWERPC_H
+// Internal codes for all powerpc registers.
+enum {
+  k_first_gpr_powerpc,
+  gpr_r0_powerpc = k_first_gpr_powerpc,
+  gpr_r1_powerpc,
+  gpr_r2_powerpc,
+  gpr_r3_powerpc,
+  gpr_r4_powerpc,
+  gpr_r5_powerpc,
+  gpr_r6_powerpc,
+  gpr_r7_powerpc,
+  gpr_r8_powerpc,
+  gpr_r9_powerpc,
+  gpr_r10_powerpc,
+  gpr_r11_powerpc,
+  gpr_r12_powerpc,
+  gpr_r13_powerpc,
+  gpr_r14_powerpc,
+  gpr_r15_powerpc,
+  gpr_r16_powerpc,
+  gpr_r17_powerpc,
+  gpr_r18_powerpc,
+  gpr_r19_powerpc,
+  gpr_r20_powerpc,
+  gpr_r21_powerpc,
+  gpr_r22_powerpc,
+  gpr_r23_powerpc,
+  gpr_r24_powerpc,
+  gpr_r25_powerpc,
+  gpr_r26_powerpc,
+  gpr_r27_powerpc,
+  gpr_r28_powerpc,
+  gpr_r29_powerpc,
+  gpr_r30_powerpc,
+  gpr_r31_powerpc,
+  gpr_lr_powerpc,
+  gpr_cr_powerpc,
+  gpr_xer_powerpc,
+  gpr_ctr_powerpc,
+  gpr_pc_powerpc,
+  k_last_gpr_powerpc = gpr_pc_powerpc,
+
+  k_first_fpr,
+  fpr_f0_powerpc = k_first_fpr,
+  fpr_f1_powerpc,
+  fpr_f2_powerpc,
+  fpr_f3_powerpc,
+  fpr_f4_powerpc,
+  fpr_f5_powerpc,
+  fpr_f6_powerpc,
+  fpr_f7_powerpc,
+  fpr_f8_powerpc,
+  fpr_f9_powerpc,
+  fpr_f10_powerpc,
+  fpr_f11_powerpc,
+  fpr_f12_powerpc,
+  fpr_f13_powerpc,
+  fpr_f14_powerpc,
+  fpr_f15_powerpc,
+  fpr_f16_powerpc,
+  fpr_f17_powerpc,
+  fpr_f18_powerpc,
+  fpr_f19_powerpc,
+  fpr_f20_powerpc,
+  fpr_f21_powerpc,
+  fpr_f22_powerpc,
+  fpr_f23_powerpc,
+  fpr_f24_powerpc,
+  fpr_f25_powerpc,
+  fpr_f26_powerpc,
+  fpr_f27_powerpc,
+  fpr_f28_powerpc,
+  fpr_f29_powerpc,
+  fpr_f30_powerpc,
+  fpr_f31_powerpc,
+  fpr_fpscr_powerpc,
+  k_last_fpr = fpr_fpscr_powerpc,
+
+  k_first_vmx,
+  vmx_v0_powerpc = k_first_vmx,
+  vmx_v1_powerpc,
+  vmx_v2_powerpc,
+  vmx_v3_powerpc,
+  vmx_v4_powerpc,
+  vmx_v5_powerpc,
+  vmx_v6_powerpc,
+  vmx_v7_powerpc,
+  vmx_v8_powerpc,
+  vmx_v9_powerpc,
+  vmx_v10_powerpc,
+  vmx_v11_powerpc,
+  vmx_v12_powerpc,
+  vmx_v13_powerpc,
+  vmx_v14_powerpc,
+  vmx_v15_powerpc,
+  vmx_v16_powerpc,
+  vmx_v17_powerpc,
+  vmx_v18_powerpc,
+  vmx_v19_powerpc,
+  vmx_v20_powerpc,
+  vmx_v21_powerpc,
+  vmx_v22_powerpc,
+  vmx_v23_powerpc,
+  vmx_v24_powerpc,
+  vmx_v25_powerpc,
+  vmx_v26_powerpc,
+  vmx_v27_powerpc,
+  vmx_v28_powerpc,
+  vmx_v29_powerpc,
+  vmx_v30_powerpc,
+  vmx_v31_powerpc,
+  vmx_vrsave_powerpc,
+  vmx_vscr_powerpc,
+  k_last_vmx = vmx_vscr_powerpc,
+
+  k_num_registers_powerpc,
+  k_num_gpr_registers_powerpc = k_last_gpr_powerpc - k_first_gpr_powerpc + 1,
+  k_num_fpr_registers_powerpc = k_last_fpr - k_first_fpr + 1,
+  k_num_vmx_registers_powerpc = k_last_vmx - k_first_vmx + 1,
+};
+
+#endif // LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_POWERPC_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h b/lldb/source/Register/Arch/RegisterContext_s390x.h
similarity index 93%
rename from lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h
rename to lldb/source/Register/Arch/RegisterContext_s390x.h
index 248b3bd0beacb..2bea399dfd298 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h
+++ b/lldb/source/Register/Arch/RegisterContext_s390x.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_S390X_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_S390X_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_S390X_H
+#define LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_S390X_H
 
 // SystemZ ehframe, dwarf regnums
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.cpp b/lldb/source/Register/Arch/RegisterContext_x86.cpp
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterContext_x86.cpp
rename to lldb/source/Register/Arch/RegisterContext_x86.cpp
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h b/lldb/source/Register/Arch/RegisterContext_x86.h
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
rename to lldb/source/Register/Arch/RegisterContext_x86.h
index d1d7e94f31776..2e06f9ae28138 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContext_x86.h
+++ b/lldb/source/Register/Arch/RegisterContext_x86.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_X86_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXT_X86_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_X86_H
+#define LLDB_SOURCE_REGISTER_ARCH_REGISTERCONTEXT_X86_H
 
 #include <cstddef>
 #include <cstdint>
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h b/lldb/source/Register/Arch/RegisterInfos_arm.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h
rename to lldb/source/Register/Arch/RegisterInfos_arm.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h b/lldb/source/Register/Arch/RegisterInfos_arm64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
rename to lldb/source/Register/Arch/RegisterInfos_arm64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64_sve.h b/lldb/source/Register/Arch/RegisterInfos_arm64_sve.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_arm64_sve.h
rename to lldb/source/Register/Arch/RegisterInfos_arm64_sve.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h b/lldb/source/Register/Arch/RegisterInfos_i386.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h
rename to lldb/source/Register/Arch/RegisterInfos_i386.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h b/lldb/source/Register/Arch/RegisterInfos_loongarch64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_loongarch64.h
rename to lldb/source/Register/Arch/RegisterInfos_loongarch64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h b/lldb/source/Register/Arch/RegisterInfos_mips.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h
rename to lldb/source/Register/Arch/RegisterInfos_mips.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h b/lldb/source/Register/Arch/RegisterInfos_mips64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h
rename to lldb/source/Register/Arch/RegisterInfos_mips64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h b/lldb/source/Register/Arch/RegisterInfos_powerpc.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h
rename to lldb/source/Register/Arch/RegisterInfos_powerpc.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h b/lldb/source/Register/Arch/RegisterInfos_ppc64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h
rename to lldb/source/Register/Arch/RegisterInfos_ppc64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h b/lldb/source/Register/Arch/RegisterInfos_ppc64le.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h
rename to lldb/source/Register/Arch/RegisterInfos_ppc64le.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h b/lldb/source/Register/Arch/RegisterInfos_riscv32.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_riscv32.h
rename to lldb/source/Register/Arch/RegisterInfos_riscv32.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h b/lldb/source/Register/Arch/RegisterInfos_riscv64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_riscv64.h
rename to lldb/source/Register/Arch/RegisterInfos_riscv64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h b/lldb/source/Register/Arch/RegisterInfos_s390x.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h
rename to lldb/source/Register/Arch/RegisterInfos_s390x.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h b/lldb/source/Register/Arch/RegisterInfos_x86_64.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
rename to lldb/source/Register/Arch/RegisterInfos_x86_64.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base.h b/lldb/source/Register/Arch/RegisterInfos_x86_64_with_base.h
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base.h
rename to lldb/source/Register/Arch/RegisterInfos_x86_64_with_base.h
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.cpp b/lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.cpp
rename to lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.cpp
index 7b2d64de230f3..fb346231f7914 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.cpp
+++ b/lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.cpp
@@ -9,6 +9,7 @@
 #include "RegisterInfos_x86_64_with_base_shared.h"
 
 #include "lldb/lldb-defines.h"
+#include <cassert>
 #include <mutex>
 
 using namespace lldb;
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.h b/lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.h
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.h
rename to lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.h
index efd6ab542016d..c967bc9f59ecd 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64_with_base_shared.h
+++ b/lldb/source/Register/Arch/RegisterInfos_x86_64_with_base_shared.h
@@ -9,10 +9,10 @@
 #ifndef lldb_RegisterInfos_x86_64_with_base_shared_h
 #define lldb_RegisterInfos_x86_64_with_base_shared_h
 
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "lldb-x86-register-enums.h"
 #include <stdint.h>
 
-#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
+#include "llvm/TargetParser/Triple.h"
 
 namespace lldb_private {
 
diff --git a/lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h b/lldb/source/Register/Arch/lldb-arm-register-enums.h
similarity index 94%
rename from lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h
rename to lldb/source/Register/Arch/lldb-arm-register-enums.h
index 8f0eed4f02c90..eb0fbe1d3e34b 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-arm-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-arm-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM_REGISTER_ENUMS_H
 
 namespace lldb_private {
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
@@ -196,4 +196,4 @@ enum {
 };
 }
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h b/lldb/source/Register/Arch/lldb-arm64-register-enums.h
similarity index 95%
rename from lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h
rename to lldb/source/Register/Arch/lldb-arm64-register-enums.h
index 39d47b8801ccf..d89acda4f3437 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-arm64-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-arm64-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM64_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM64_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM64_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM64_REGISTER_ENUMS_H
 
 namespace lldb_private {
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
@@ -261,4 +261,4 @@ enum {
 };
 }
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_ARM64_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_ARM64_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-loongarch-register-enums.h b/lldb/source/Register/Arch/lldb-loongarch-register-enums.h
similarity index 96%
rename from lldb/source/Plugins/Process/Utility/lldb-loongarch-register-enums.h
rename to lldb/source/Register/Arch/lldb-loongarch-register-enums.h
index accd53048f93e..22726cf98de32 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-loongarch-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-loongarch-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_LOONGARCH_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_LOONGARCH_REGISTER_ENUMS_H
 
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
 
@@ -245,4 +245,4 @@ enum {
   k_num_registers_loongarch
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_LOONGARCH_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h b/lldb/source/Register/Arch/lldb-ppc64-register-enums.h
similarity index 94%
rename from lldb/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h
rename to lldb/source/Register/Arch/lldb-ppc64-register-enums.h
index 19525b2c4ee34..5f9e6604c4026 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-ppc64-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-ppc64-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64_REGISTER_ENUMS_H
 
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
 
@@ -201,4 +201,4 @@ enum {
   k_num_vsx_registers_ppc64 = k_last_vsx_ppc64 - k_first_vsx_ppc64 + 1,
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h b/lldb/source/Register/Arch/lldb-ppc64le-register-enums.h
similarity index 95%
rename from lldb/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h
rename to lldb/source/Register/Arch/lldb-ppc64le-register-enums.h
index a7b5bc5ad9e34..53df636bb2dfa 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-ppc64le-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-ppc64le-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64LE_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64LE_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64LE_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64LE_REGISTER_ENUMS_H
 
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
 
@@ -204,4 +204,4 @@ enum {
   k_num_vsx_registers_ppc64le = k_last_vsx_ppc64le - k_first_vsx_ppc64le + 1,
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_PPC64LE_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_PPC64LE_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h b/lldb/source/Register/Arch/lldb-riscv-register-enums.h
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
rename to lldb/source/Register/Arch/lldb-riscv-register-enums.h
index 2ac64f118b7fa..92e9028cbd296 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-riscv-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-riscv-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_RISCV_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_RISCV_REGISTER_ENUMS_H
 
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
 
@@ -4727,4 +4727,4 @@ enum {
   k_num_registers_riscv
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_RISCV_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h b/lldb/source/Register/Arch/lldb-s390x-register-enums.h
similarity index 90%
rename from lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h
rename to lldb/source/Register/Arch/lldb-s390x-register-enums.h
index 23c441e1c8038..4b2d09ae968e2 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-s390x-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_S390X_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_S390X_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_S390X_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_S390X_REGISTER_ENUMS_H
 
 namespace lldb_private {
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
@@ -87,4 +87,4 @@ enum {
 };
 }
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_S390X_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_S390X_REGISTER_ENUMS_H
diff --git a/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h b/lldb/source/Register/Arch/lldb-x86-register-enums.h
similarity index 98%
rename from lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h
rename to lldb/source/Register/Arch/lldb-x86-register-enums.h
index 85aa254d66212..211160184ce2b 100644
--- a/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h
+++ b/lldb/source/Register/Arch/lldb-x86-register-enums.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_X86_REGISTER_ENUMS_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_X86_REGISTER_ENUMS_H
+#ifndef LLDB_SOURCE_REGISTER_ARCH_LLDB_X86_REGISTER_ENUMS_H
+#define LLDB_SOURCE_REGISTER_ARCH_LLDB_X86_REGISTER_ENUMS_H
 
 namespace lldb_private {
 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
@@ -514,4 +514,4 @@ enum {
 
 }
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_X86_REGISTER_ENUMS_H
+#endif // LLDB_SOURCE_REGISTER_ARCH_LLDB_X86_REGISTER_ENUMS_H
diff --git a/lldb/source/Register/CMakeLists.txt b/lldb/source/Register/CMakeLists.txt
new file mode 100644
index 0000000000000..6a84489332820
--- /dev/null
+++ b/lldb/source/Register/CMakeLists.txt
@@ -0,0 +1,33 @@
+add_lldb_library(lldbRegister NO_PLUGIN_DEPENDENCIES
+  Arch/RegisterContext_x86.cpp
+  Arch/RegisterInfos_x86_64_with_base_shared.cpp
+  Common/RegisterInfoDynamic_riscv32.cpp
+  Common/RegisterInfo_arm.cpp
+  Common/RegisterInfo_arm64.cpp
+  Common/RegisterInfo_loongarch64.cpp
+  Common/RegisterInfo_ppc64.cpp
+  Common/RegisterInfo_ppc64le.cpp
+  Common/RegisterInfo_riscv32.cpp
+  Common/RegisterInfo_riscv64.cpp
+  Common/RegisterTypeDetector_arm64.cpp
+  FreeBSD/RegisterInfoFreeBSD_i386.cpp
+  FreeBSD/RegisterInfoFreeBSD_powerpc.cpp
+  FreeBSD/RegisterInfoFreeBSD_x86_64.cpp
+  Linux/RegisterInfoLinux_i386.cpp
+  Linux/RegisterInfoLinux_s390x.cpp
+  Linux/RegisterInfoLinux_x86_64.cpp
+  NetBSD/RegisterInfoNetBSD_i386.cpp
+  NetBSD/RegisterInfoNetBSD_x86_64.cpp
+  OpenBSD/RegisterInfoOpenBSD_i386.cpp
+  OpenBSD/RegisterInfoOpenBSD_x86_64.cpp
+  Windows/RegisterInfoWindows_i386.cpp
+  Windows/RegisterInfoWindows_x86_64.cpp
+
+  LINK_COMPONENTS
+    Support
+    TargetParser
+  LINK_LIBS
+    lldbUtility
+  ALLOWED_INTERNAL_DEPENDENCIES
+    lldbUtility
+  )
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.cpp b/lldb/source/Register/Common/RegisterInfoDynamic_riscv32.cpp
similarity index 98%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.cpp
rename to lldb/source/Register/Common/RegisterInfoDynamic_riscv32.cpp
index 704d89c5f5dee..72f0955898060 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.cpp
+++ b/lldb/source/Register/Common/RegisterInfoDynamic_riscv32.cpp
@@ -8,7 +8,7 @@
 
 #include "RegisterInfoDynamic_riscv32.h"
 
-#include "lldb-riscv-register-enums.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "lldb/lldb-defines.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/Support/Compiler.h"
@@ -19,7 +19,7 @@
 #define FPR_OFFSET(idx) ((idx) * sizeof(uint32_t))
 
 #define DECLARE_REGISTER_INFOS_RISCV32_STRUCT
-#include "Plugins/Process/Utility/RegisterInfos_riscv32.h"
+#include "Register/Arch/RegisterInfos_riscv32.h"
 #undef DECLARE_REGISTER_INFOS_RISCV32_STRUCT
 
 RegisterInfoDynamic_riscv32::RegisterInfoDynamic_riscv32(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.h b/lldb/source/Register/Common/RegisterInfoDynamic_riscv32.h
similarity index 90%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.h
rename to lldb/source/Register/Common/RegisterInfoDynamic_riscv32.h
index 4e251114ec831..191e9770987d4 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoDynamic_riscv32.h
+++ b/lldb/source/Register/Common/RegisterInfoDynamic_riscv32.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFODYNAMIC_RISCV32_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFODYNAMIC_RISCV32_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFODYNAMIC_RISCV32_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFODYNAMIC_RISCV32_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/DynamicRegisterInfo.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/lldb-private.h"
@@ -67,4 +67,4 @@ class RegisterInfoDynamic_riscv32
       llvm::SmallVectorImpl<lldb_private::RegisterInfo> &cs_reg_infos);
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFODYNAMIC_RISCV32_H
+#endif // LLDB_SOURCE_REGISTER_COMMON_REGISTERINFODYNAMIC_RISCV32_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm.cpp b/lldb/source/Register/Common/RegisterInfo_arm.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_arm.cpp
rename to lldb/source/Register/Common/RegisterInfo_arm.cpp
index b3b55495b0d55..8b285c13774e0 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_arm.cpp
@@ -47,7 +47,7 @@ using namespace lldb_private;
 
 // Include RegisterInfos_arm to declare our g_register_infos_arm structure.
 #define DECLARE_REGISTER_INFOS_ARM_STRUCT
-#include "RegisterInfos_arm.h"
+#include "Register/Arch/RegisterInfos_arm.h"
 #undef DECLARE_REGISTER_INFOS_ARM_STRUCT
 
 static const lldb_private::RegisterInfo *
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm.h b/lldb/source/Register/Common/RegisterInfo_arm.h
similarity index 89%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_arm.h
rename to lldb/source/Register/Common/RegisterInfo_arm.h
index af43567b1f15d..eea77bc2365ef 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm.h
+++ b/lldb/source/Register/Common/RegisterInfo_arm.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_ARM_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_ARM_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_ARM_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_ARM_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/lldb-private.h"
 
@@ -77,4 +77,4 @@ class RegisterInfo_arm : public lldb_private::RegisterInfoAndSetInterface {
   bool m_has_tls_reg;
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_ARM_H
+#endif // LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_ARM_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.cpp b/lldb/source/Register/Common/RegisterInfo_arm64.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.cpp
rename to lldb/source/Register/Common/RegisterInfo_arm64.cpp
index e1e51a66815d9..3fefc777d987b 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_arm64.cpp
@@ -68,8 +68,8 @@
 
 // Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
 #define DECLARE_REGISTER_INFOS_ARM64_STRUCT
-#include "RegisterInfos_arm64.h"
-#include "RegisterInfos_arm64_sve.h"
+#include "Register/Arch/RegisterInfos_arm64.h"
+#include "Register/Arch/RegisterInfos_arm64_sve.h"
 #undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
 
 static lldb_private::RegisterInfo g_register_infos_pauth[] = {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.h b/lldb/source/Register/Common/RegisterInfo_arm64.h
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.h
rename to lldb/source/Register/Common/RegisterInfo_arm64.h
index b9f0d30708f48..264015ae35404 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.h
+++ b/lldb/source/Register/Common/RegisterInfo_arm64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_ARM64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_ARM64_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_ARM64_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_ARM64_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Flags.h"
 #include "lldb/lldb-private.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.cpp b/lldb/source/Register/Common/RegisterInfo_loongarch64.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.cpp
rename to lldb/source/Register/Common/RegisterInfo_loongarch64.cpp
index 3d9c16fbecfc8..7485c1cc5dca2 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_loongarch64.cpp
@@ -34,7 +34,7 @@
    sizeof(RegisterInfo_loongarch64::LASX))
 
 #define DECLARE_REGISTER_INFOS_LOONGARCH64_STRUCT
-#include "RegisterInfos_loongarch64.h"
+#include "Register/Arch/RegisterInfos_loongarch64.h"
 #undef DECLARE_REGISTER_INFOS_LOONGARCH64_STRUCT
 
 const lldb_private::RegisterInfo *
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.h b/lldb/source/Register/Common/RegisterInfo_loongarch64.h
similarity index 91%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.h
rename to lldb/source/Register/Common/RegisterInfo_loongarch64.h
index b4b404ba1e29f..eb66158b4bbe2 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_loongarch64.h
+++ b/lldb/source/Register/Common/RegisterInfo_loongarch64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_LOONGARCH64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_LOONGARCH64_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_LOONGARCH64_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_LOONGARCH64_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/lldb-private.h"
 #include <map>
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.cpp b/lldb/source/Register/Common/RegisterInfo_ppc64.cpp
similarity index 98%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.cpp
rename to lldb/source/Register/Common/RegisterInfo_ppc64.cpp
index 9842e9145ed25..8b4aa40fa0d00 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_ppc64.cpp
@@ -17,7 +17,7 @@
 
 // Include RegisterInfo_ppc64 to declare our g_register_infos_ppc64
 #define DECLARE_REGISTER_INFOS_PPC64_STRUCT
-#include "RegisterInfos_ppc64.h"
+#include "Register/Arch/RegisterInfos_ppc64.h"
 #undef DECLARE_REGISTER_INFOS_PPC64_STRUCT
 
 static const lldb_private::RegisterInfo *
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.h b/lldb/source/Register/Common/RegisterInfo_ppc64.h
similarity index 78%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.h
rename to lldb/source/Register/Common/RegisterInfo_ppc64.h
index 86d017dfd805b..e5c1228929ed9 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64.h
+++ b/lldb/source/Register/Common/RegisterInfo_ppc64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_PPC64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_PPC64_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_PPC64_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_PPC64_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/lldb-private.h"
 
@@ -29,4 +29,4 @@ class RegisterInfo_ppc64 : public lldb_private::RegisterInfoInterface {
   size_t m_gpr_size;
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_PPC64_H
+#endif // LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_PPC64_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.cpp b/lldb/source/Register/Common/RegisterInfo_ppc64le.cpp
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.cpp
rename to lldb/source/Register/Common/RegisterInfo_ppc64le.cpp
index c351e6581921f..ef0f9143414ff 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_ppc64le.cpp
@@ -17,7 +17,7 @@
 
 // Include RegisterInfo_ppc64le to declare our g_register_infos_ppc64le
 #define DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
-#include "RegisterInfos_ppc64le.h"
+#include "Register/Arch/RegisterInfos_ppc64le.h"
 #undef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT
 
 static const lldb_private::RegisterInfo *
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.h b/lldb/source/Register/Common/RegisterInfo_ppc64le.h
similarity index 83%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.h
rename to lldb/source/Register/Common/RegisterInfo_ppc64le.h
index 2b1d64b4ddc6b..71481aceb2fb7 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_ppc64le.h
+++ b/lldb/source/Register/Common/RegisterInfo_ppc64le.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_PPC64LE_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_PPC64LE_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_PPC64LE_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_PPC64LE_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/lldb-private.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.cpp b/lldb/source/Register/Common/RegisterInfo_riscv32.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.cpp
rename to lldb/source/Register/Common/RegisterInfo_riscv32.cpp
index cfc9bba9f57df..6e5fb3d366e63 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_riscv32.cpp
@@ -22,7 +22,7 @@
    sizeof(RegisterInfo_riscv32::FPR))
 
 #define DECLARE_REGISTER_INFOS_RISCV32_STRUCT
-#include "RegisterInfos_riscv32.h"
+#include "Register/Arch/RegisterInfos_riscv32.h"
 #undef DECLARE_REGISTER_INFOS_RISCV32_STRUCT
 
 const lldb_private::RegisterInfo *RegisterInfo_riscv32::GetRegisterInfoPtr(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.h b/lldb/source/Register/Common/RegisterInfo_riscv32.h
similarity index 91%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.h
rename to lldb/source/Register/Common/RegisterInfo_riscv32.h
index 33fd53d469f0e..79ec087a7f707 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv32.h
+++ b/lldb/source/Register/Common/RegisterInfo_riscv32.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_RISCV32_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_RISCV32_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_RISCV32_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_RISCV32_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Flags.h"
 #include "lldb/lldb-private.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.cpp b/lldb/source/Register/Common/RegisterInfo_riscv64.cpp
similarity index 99%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.cpp
rename to lldb/source/Register/Common/RegisterInfo_riscv64.cpp
index 4eb5beb37aa38..09ccf4447737f 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.cpp
+++ b/lldb/source/Register/Common/RegisterInfo_riscv64.cpp
@@ -18,7 +18,7 @@
 #define FPR_OFFSET(idx) ((idx)*8 + sizeof(RegisterInfo_riscv64::GPR))
 
 #define DECLARE_REGISTER_INFOS_RISCV64_STRUCT
-#include "RegisterInfos_riscv64.h"
+#include "Register/Arch/RegisterInfos_riscv64.h"
 #undef DECLARE_REGISTER_INFOS_RISCV64_STRUCT
 
 // Number of register sets provided by this context.
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.h b/lldb/source/Register/Common/RegisterInfo_riscv64.h
similarity index 92%
rename from lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.h
rename to lldb/source/Register/Common/RegisterInfo_riscv64.h
index 38b38b38e0ac1..a8e19d210ee15 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfo_riscv64.h
+++ b/lldb/source/Register/Common/RegisterInfo_riscv64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_RISCV64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFO_RISCV64_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_RISCV64_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERINFO_RISCV64_H
 
-#include "RegisterInfoAndSetInterface.h"
+#include "Register/RegisterInfoAndSetInterface.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Utility/Flags.h"
 #include "lldb/lldb-private.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp b/lldb/source/Register/Common/RegisterTypeDetector_arm64.cpp
similarity index 100%
rename from lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.cpp
rename to lldb/source/Register/Common/RegisterTypeDetector_arm64.cpp
diff --git a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h b/lldb/source/Register/Common/RegisterTypeDetector_arm64.h
similarity index 96%
rename from lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
rename to lldb/source/Register/Common/RegisterTypeDetector_arm64.h
index a5b39a78b92f3..3d2dd502b94c3 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterTypeDetector_arm64.h
+++ b/lldb/source/Register/Common/RegisterTypeDetector_arm64.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERTYPEDETECTOR_ARM64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERTYPEDETECTOR_ARM64_H
+#ifndef LLDB_SOURCE_REGISTER_COMMON_REGISTERTYPEDETECTOR_ARM64_H
+#define LLDB_SOURCE_REGISTER_COMMON_REGISTERTYPEDETECTOR_ARM64_H
 
 #include "lldb/Utility/RegisterInfo.h"
 #include "lldb/Utility/RegisterType.h"
@@ -127,4 +127,4 @@ class Arm64RegisterTypeDetector {
 
 } // namespace lldb_private
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERTYPEDETECTOR_ARM64_H
+#endif // LLDB_SOURCE_REGISTER_COMMON_REGISTERTYPEDETECTOR_ARM64_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.cpp b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.cpp
similarity index 94%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.cpp
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.cpp
index 8d7a7370d32a0..7006d59546ffa 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.cpp
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoFreeBSD_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
@@ -60,7 +60,7 @@ struct UserArea {
 
 // Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
 #define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
+#include "Register/Arch/RegisterInfos_i386.h"
 #undef DECLARE_REGISTER_INFOS_I386_STRUCT
 
 RegisterInfoFreeBSD_i386::RegisterInfoFreeBSD_i386(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.h
similarity index 79%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.h
index 9f084d27cf3fb..aa762fbb20ea3 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_i386.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_I386_H
+#ifndef LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_I386_H
+#define LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_I386_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoFreeBSD_i386 : public lldb_private::RegisterInfoInterface {
 public:
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.cpp b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.cpp
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.cpp
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.cpp
index 8db3b05addd6d..7334301b5ed93 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.cpp
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.cpp
@@ -7,7 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoFreeBSD_powerpc.h"
-#include "RegisterContextPOSIX_powerpc.h"
+#include "Register/Arch/RegisterContext_powerpc.h"
+#include "lldb/lldb-defines.h"
 #include <vector>
 
 using namespace lldb_private;
@@ -171,7 +172,7 @@ typedef struct _VMX {
 // Include RegisterInfos_powerpc to declare our g_register_infos_powerpc
 // structure.
 #define DECLARE_REGISTER_INFOS_POWERPC_STRUCT
-#include "RegisterInfos_powerpc.h"
+#include "Register/Arch/RegisterInfos_powerpc.h"
 #undef DECLARE_REGISTER_INFOS_POWERPC_STRUCT
 
 RegisterInfoFreeBSD_powerpc::RegisterInfoFreeBSD_powerpc(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h
similarity index 85%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h
index 529b71566c828..985eb66e7d454 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_POWERPC_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_POWERPC_H
+#ifndef LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_POWERPC_H
+#define LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_POWERPC_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoFreeBSD_powerpc
     : public lldb_private::RegisterInfoInterface {
@@ -48,4 +48,4 @@ class RegisterInfoFreeBSD_powerpc64 : public RegisterInfoFreeBSD_powerpc {
   uint32_t GetRegisterCount() const override;
 };
 
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_POWERPC_H
+#endif // LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_POWERPC_H
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.cpp b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.cpp
similarity index 95%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.cpp
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.cpp
index f01d450da3443..4724bda362c23 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.cpp
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.cpp
@@ -8,8 +8,8 @@
 
 #include "RegisterInfoFreeBSD_x86_64.h"
 #include "RegisterInfoFreeBSD_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 #include "llvm/Support/Threading.h"
 #include <vector>
@@ -69,7 +69,7 @@ struct UserArea {
 // Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
 // structure.
 #define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64.h"
+#include "Register/Arch/RegisterInfos_x86_64.h"
 #undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
 static std::vector<lldb_private::RegisterInfo> &
@@ -88,7 +88,7 @@ GetSharedRegisterInfoVector_i386(const lldb_private::ArchSpec &arch) {
 // Include RegisterInfos_x86_64 to update the g_register_infos structure
 //  with x86_64 offsets.
 #define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
-#include "RegisterInfos_x86_64.h"
+#include "Register/Arch/RegisterInfos_x86_64.h"
 #undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
     }
   });
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h
similarity index 81%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h
rename to lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h
index a2f6b21213204..46e6bc70c1cf3 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h
+++ b/lldb/source/Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_X86_64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOFREEBSD_X86_64_H
+#ifndef LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_X86_64_H
+#define LLDB_SOURCE_REGISTER_FREEBSD_REGISTERINFOFREEBSD_X86_64_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoFreeBSD_x86_64
     : public lldb_private::RegisterInfoInterface {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.cpp b/lldb/source/Register/Linux/RegisterInfoLinux_i386.cpp
similarity index 96%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.cpp
rename to lldb/source/Register/Linux/RegisterInfoLinux_i386.cpp
index 81f9c99384959..ddbe2161e9371 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.cpp
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_i386.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoLinux_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
@@ -85,7 +85,7 @@ struct UserArea {
 
 // Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
 #define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
+#include "Register/Arch/RegisterInfos_i386.h"
 #undef DECLARE_REGISTER_INFOS_I386_STRUCT
 
 RegisterInfoLinux_i386::RegisterInfoLinux_i386(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.h b/lldb/source/Register/Linux/RegisterInfoLinux_i386.h
similarity index 80%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.h
rename to lldb/source/Register/Linux/RegisterInfoLinux_i386.h
index bfa7e3495ee0a..d4df6e25694db 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_i386.h
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_i386.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_I386_H
+#ifndef LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_I386_H
+#define LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_I386_H
 
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86.h"
+#include "RegisterInfoLinux_x86.h"
 
 class RegisterInfoLinux_i386
     : public lldb_private::RegisterInfoLinux_x86 {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.cpp b/lldb/source/Register/Linux/RegisterInfoLinux_s390x.cpp
similarity index 92%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.cpp
rename to lldb/source/Register/Linux/RegisterInfoLinux_s390x.cpp
index 99aabca3e95f5..36681bf7d3583 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.cpp
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_s390x.cpp
@@ -7,14 +7,16 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoLinux_s390x.h"
-#include "RegisterContextPOSIX_s390x.h"
+#include "Register/Arch/RegisterContext_s390x.h"
+#include "Register/Arch/lldb-s390x-register-enums.h"
+#include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
 using namespace lldb;
 
 // Include RegisterInfos_s390x to declare our g_register_infos_s390x structure.
 #define DECLARE_REGISTER_INFOS_S390X_STRUCT
-#include "RegisterInfos_s390x.h"
+#include "Register/Arch/RegisterInfos_s390x.h"
 #undef DECLARE_REGISTER_INFOS_S390X_STRUCT
 
 static const RegisterInfo *GetRegisterInfoPtr(const ArchSpec &target_arch) {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.h b/lldb/source/Register/Linux/RegisterInfoLinux_s390x.h
similarity index 83%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.h
rename to lldb/source/Register/Linux/RegisterInfoLinux_s390x.h
index 292bd611bebf7..ac91df01371e7 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_s390x.h
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_s390x.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_S390X_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_S390X_H
+#ifndef LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_S390X_H
+#define LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_S390X_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoLinux_s390x : public lldb_private::RegisterInfoInterface {
 public:
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86.h b/lldb/source/Register/Linux/RegisterInfoLinux_x86.h
similarity index 82%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86.h
rename to lldb/source/Register/Linux/RegisterInfoLinux_x86.h
index 496a48f15c247..c51ac6c095468 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86.h
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_x86.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_X86_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_X86_H
+#ifndef LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_X86_H
+#define LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_X86_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 namespace lldb_private {
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.cpp b/lldb/source/Register/Linux/RegisterInfoLinux_x86_64.cpp
similarity index 96%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.cpp
rename to lldb/source/Register/Linux/RegisterInfoLinux_x86_64.cpp
index 9862b5846be1b..f2f1a7aabfeb5 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.cpp
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_x86_64.cpp
@@ -8,8 +8,8 @@
 
 #include "RegisterInfoLinux_x86_64.h"
 #include "RegisterInfoLinux_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 #include <vector>
 
@@ -80,7 +80,7 @@ struct UserArea {
 // Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64_with_base
 // structure.
 #define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64_with_base.h"
+#include "Register/Arch/RegisterInfos_x86_64_with_base.h"
 #undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
 static std::vector<lldb_private::RegisterInfo> &GetPrivateRegisterInfoVector() {
@@ -105,7 +105,7 @@ GetRegisterInfo_i386(const lldb_private::ArchSpec &arch) {
 // Include RegisterInfos_x86_64 to update the g_register_infos structure
 //  with x86_64 offsets.
 #define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
-#include "RegisterInfos_x86_64_with_base.h"
+#include "Register/Arch/RegisterInfos_x86_64_with_base.h"
 #undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
   }
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.h b/lldb/source/Register/Linux/RegisterInfoLinux_x86_64.h
similarity index 82%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.h
rename to lldb/source/Register/Linux/RegisterInfoLinux_x86_64.h
index 5f7a78d6ff7c2..aa2655e6c21d8 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoLinux_x86_64.h
+++ b/lldb/source/Register/Linux/RegisterInfoLinux_x86_64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_X86_64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOLINUX_X86_64_H
+#ifndef LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_X86_64_H
+#define LLDB_SOURCE_REGISTER_LINUX_REGISTERINFOLINUX_X86_64_H
 
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86.h"
+#include "RegisterInfoLinux_x86.h"
 
 class RegisterInfoLinux_x86_64
     : public lldb_private::RegisterInfoLinux_x86 {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.cpp b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.cpp
similarity index 95%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.cpp
rename to lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.cpp
index df4bad6d98a1a..8d82db1eaa0e6 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.cpp
+++ b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoNetBSD_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
@@ -72,7 +72,7 @@ struct UserArea {
 
 // Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
 #define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
+#include "Register/Arch/RegisterInfos_i386.h"
 #undef DECLARE_REGISTER_INFOS_I386_STRUCT
 
 RegisterInfoNetBSD_i386::RegisterInfoNetBSD_i386(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.h b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.h
similarity index 79%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.h
rename to lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.h
index 0000bd934e3c3..adf4d42e0d57c 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_i386.h
+++ b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_i386.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFONETBSD_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFONETBSD_I386_H
+#ifndef LLDB_SOURCE_REGISTER_NETBSD_REGISTERINFONETBSD_I386_H
+#define LLDB_SOURCE_REGISTER_NETBSD_REGISTERINFONETBSD_I386_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoNetBSD_i386 : public lldb_private::RegisterInfoInterface {
 public:
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.cpp b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.cpp
similarity index 96%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.cpp
rename to lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.cpp
index b483c7a2919a7..26beb4473e3f8 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.cpp
+++ b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.cpp
@@ -8,8 +8,8 @@
 
 #include "RegisterInfoNetBSD_x86_64.h"
 #include "RegisterInfoNetBSD_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/TargetParser/Triple.h"
@@ -83,7 +83,7 @@ struct UserArea {
 // Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
 // structure.
 #define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64.h"
+#include "Register/Arch/RegisterInfos_x86_64.h"
 #undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
 static std::vector<lldb_private::RegisterInfo> &GetPrivateRegisterInfoVector() {
@@ -108,7 +108,7 @@ GetRegisterInfo_i386(const lldb_private::ArchSpec &arch) {
 // Include RegisterInfos_x86_64 to update the g_register_infos structure
 //  with x86_64 offsets.
 #define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
-#include "RegisterInfos_x86_64.h"
+#include "Register/Arch/RegisterInfos_x86_64.h"
 #undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
   }
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.h
similarity index 83%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h
rename to lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.h
index aadcc44127947..ec9a0fa7eb0af 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h
+++ b/lldb/source/Register/NetBSD/RegisterInfoNetBSD_x86_64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFONETBSD_X86_64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFONETBSD_X86_64_H
+#ifndef LLDB_SOURCE_REGISTER_NETBSD_REGISTERINFONETBSD_X86_64_H
+#define LLDB_SOURCE_REGISTER_NETBSD_REGISTERINFONETBSD_X86_64_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoNetBSD_x86_64
     : public lldb_private::RegisterInfoInterface {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.cpp b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.cpp
similarity index 93%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.cpp
rename to lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.cpp
index b2390f1304bd0..94eb0f2e89357 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.cpp
+++ b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoOpenBSD_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
@@ -54,7 +54,7 @@ struct UserArea {
 
 // Include RegisterInfos_i386 to declare our g_register_infos_i386 structure.
 #define DECLARE_REGISTER_INFOS_I386_STRUCT
-#include "RegisterInfos_i386.h"
+#include "Register/Arch/RegisterInfos_i386.h"
 #undef DECLARE_REGISTER_INFOS_I386_STRUCT
 
 RegisterInfoOpenBSD_i386::RegisterInfoOpenBSD_i386(
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.h b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.h
similarity index 79%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.h
rename to lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.h
index f4db6e7cc45ae..4f79924b04774 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_i386.h
+++ b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_i386.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOOPENBSD_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOOPENBSD_I386_H
+#ifndef LLDB_SOURCE_REGISTER_OPENBSD_REGISTERINFOOPENBSD_I386_H
+#define LLDB_SOURCE_REGISTER_OPENBSD_REGISTERINFOOPENBSD_I386_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoOpenBSD_i386 : public lldb_private::RegisterInfoInterface {
 public:
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.cpp b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.cpp
similarity index 95%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.cpp
rename to lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.cpp
index 809d56c14b80b..885bdfdb55947 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.cpp
+++ b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoOpenBSD_x86_64.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 #include <vector>
 
@@ -63,7 +63,7 @@ struct UserArea {
 // Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64
 // structure.
 #define DECLARE_REGISTER_INFOS_X86_64_STRUCT
-#include "RegisterInfos_x86_64.h"
+#include "Register/Arch/RegisterInfos_x86_64.h"
 #undef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
 static const RegisterInfo *
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.h b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.h
similarity index 81%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.h
rename to lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.h
index 9f0c4e0d50e81..ca3bc2aab11c6 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoOpenBSD_x86_64.h
+++ b/lldb/source/Register/OpenBSD/RegisterInfoOpenBSD_x86_64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOOPENBSD_X86_64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOOPENBSD_X86_64_H
+#ifndef LLDB_SOURCE_REGISTER_OPENBSD_REGISTERINFOOPENBSD_X86_64_H
+#define LLDB_SOURCE_REGISTER_OPENBSD_REGISTERINFOOPENBSD_X86_64_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoOpenBSD_x86_64
     : public lldb_private::RegisterInfoInterface {
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoAndSetInterface.h b/lldb/source/Register/RegisterInfoAndSetInterface.h
similarity index 87%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoAndSetInterface.h
rename to lldb/source/Register/RegisterInfoAndSetInterface.h
index 7e569dc9ba784..5a9f4e83a48a4 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoAndSetInterface.h
+++ b/lldb/source/Register/RegisterInfoAndSetInterface.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOANDSETINTERFACE_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOANDSETINTERFACE_H
+#ifndef LLDB_SOURCE_REGISTER_REGISTERINFOANDSETINTERFACE_H
+#define LLDB_SOURCE_REGISTER_REGISTERINFOANDSETINTERFACE_H
 
 #include "RegisterInfoInterface.h"
 
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h b/lldb/source/Register/RegisterInfoInterface.h
similarity index 91%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h
rename to lldb/source/Register/RegisterInfoInterface.h
index 38d086de22bee..d6adadc0e2051 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoInterface.h
+++ b/lldb/source/Register/RegisterInfoInterface.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOINTERFACE_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOINTERFACE_H
+#ifndef LLDB_SOURCE_REGISTER_REGISTERINFOINTERFACE_H
+#define LLDB_SOURCE_REGISTER_REGISTERINFOINTERFACE_H
 
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/RegisterInfo.h"
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.cpp b/lldb/source/Register/Windows/RegisterInfoWindows_i386.cpp
similarity index 97%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.cpp
rename to lldb/source/Register/Windows/RegisterInfoWindows_i386.cpp
index 3bdeeba1142b4..087a32a0381ad 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.cpp
+++ b/lldb/source/Register/Windows/RegisterInfoWindows_i386.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoWindows_i386.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 using namespace lldb_private;
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.h b/lldb/source/Register/Windows/RegisterInfoWindows_i386.h
similarity index 80%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.h
rename to lldb/source/Register/Windows/RegisterInfoWindows_i386.h
index 994526ad4c417..22ce9be5886b7 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_i386.h
+++ b/lldb/source/Register/Windows/RegisterInfoWindows_i386.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOWINDOWS_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOWINDOWS_I386_H
+#ifndef LLDB_SOURCE_REGISTER_WINDOWS_REGISTERINFOWINDOWS_I386_H
+#define LLDB_SOURCE_REGISTER_WINDOWS_REGISTERINFOWINDOWS_I386_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoWindows_i386 : public lldb_private::RegisterInfoInterface {
 public:
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.cpp b/lldb/source/Register/Windows/RegisterInfoWindows_x86_64.cpp
similarity index 98%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.cpp
rename to lldb/source/Register/Windows/RegisterInfoWindows_x86_64.cpp
index 54d9e10225b47..ed17647d452a9 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.cpp
+++ b/lldb/source/Register/Windows/RegisterInfoWindows_x86_64.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterInfoWindows_x86_64.h"
-#include "RegisterContext_x86.h"
-#include "lldb-x86-register-enums.h"
+#include "Register/Arch/RegisterContext_x86.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "lldb/lldb-defines.h"
 
 #include <vector>
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.h b/lldb/source/Register/Windows/RegisterInfoWindows_x86_64.h
similarity index 80%
rename from lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.h
rename to lldb/source/Register/Windows/RegisterInfoWindows_x86_64.h
index a0fe949b7fcf4..dba2f2100fc59 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterInfoWindows_x86_64.h
+++ b/lldb/source/Register/Windows/RegisterInfoWindows_x86_64.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOWINDOWS_X86_64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERINFOWINDOWS_X86_64_H
+#ifndef LLDB_SOURCE_REGISTER_WINDOWS_REGISTERINFOWINDOWS_X86_64_H
+#define LLDB_SOURCE_REGISTER_WINDOWS_REGISTERINFOWINDOWS_X86_64_H
 
-#include "RegisterInfoInterface.h"
+#include "Register/RegisterInfoInterface.h"
 
 class RegisterInfoWindows_x86_64
     : public lldb_private::RegisterInfoInterface {
diff --git a/lldb/unittests/Instruction/ARM64/TestAArch64Emulator.cpp b/lldb/unittests/Instruction/ARM64/TestAArch64Emulator.cpp
index fa12aca17dd86..654974ef2a55a 100644
--- a/lldb/unittests/Instruction/ARM64/TestAArch64Emulator.cpp
+++ b/lldb/unittests/Instruction/ARM64/TestAArch64Emulator.cpp
@@ -16,8 +16,8 @@
 #include "lldb/Utility/RegisterValue.h"
 
 #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp b/lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp
index 1e72393c743a9..9dbc788578a6a 100644
--- a/lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp
+++ b/lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp
@@ -15,8 +15,8 @@
 #include "gtest/gtest.h"
 
 #include "Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h"
-#include "Plugins/Process/Utility/RegisterInfo_loongarch64.h"
-#include "Plugins/Process/Utility/lldb-loongarch-register-enums.h"
+#include "Register/Common/RegisterInfo_loongarch64.h"
+#include "Register/Arch/lldb-loongarch-register-enums.h"
 
 using namespace llvm;
 using namespace lldb;
diff --git a/lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp b/lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
index 3f7398e151e94..7d865c5c49334 100644
--- a/lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
+++ b/lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
@@ -16,9 +16,9 @@
 #include "lldb/Utility/RegisterValue.h"
 
 #include "Plugins/Instruction/RISCV/EmulateInstructionRISCV.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv32.h"
-#include "Plugins/Process/Utility/RegisterInfo_riscv64.h"
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/Common/RegisterInfo_riscv32.h"
+#include "Register/Common/RegisterInfo_riscv64.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 
 using namespace llvm;
 using namespace lldb;
diff --git a/lldb/unittests/Instruction/RISCV/TestRiscvInstEmulation.cpp b/lldb/unittests/Instruction/RISCV/TestRiscvInstEmulation.cpp
index 009b9cdc79607..dfa5c2ad4f851 100644
--- a/lldb/unittests/Instruction/RISCV/TestRiscvInstEmulation.cpp
+++ b/lldb/unittests/Instruction/RISCV/TestRiscvInstEmulation.cpp
@@ -16,7 +16,7 @@
 
 #include "Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h"
 #include "Plugins/Instruction/RISCV/EmulateInstructionRISCV.h"
-#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
+#include "Register/Arch/lldb-riscv-register-enums.h"
 #include "llvm/Support/TargetSelect.h"
 
 using namespace lldb;
diff --git a/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp b/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
index 264678e4c4ed3..ab89d5f82df2a 100644
--- a/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
+++ b/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
@@ -10,7 +10,7 @@
 #include "gtest/gtest.h"
 
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 
diff --git a/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp b/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
index 1a95a0d0fc4e9..0021169509b4d 100644
--- a/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
+++ b/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
@@ -10,7 +10,7 @@
 #include "gtest/gtest.h"
 
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 #include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 
@@ -75,4 +75,3 @@ symbols:         []
   // without the zero padding, instead of SizeOfRawData (512).
   EXPECT_EQ(section_data.GetByteSize(), (uint64_t)496);
 }
-
diff --git a/lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp b/lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp
index 4dd9a3e505a6e..98433da8948d7 100644
--- a/lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp
+++ b/lldb/unittests/Process/Utility/RegisterInfoFreeBSDTest.cpp
@@ -17,15 +17,15 @@
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_powerpc.h"
-#include "Plugins/Process/Utility/RegisterInfoFreeBSD_x86_64.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_i386.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_powerpc.h"
+#include "Register/FreeBSD/RegisterInfoFreeBSD_x86_64.h"
 #include "Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm.h"
-#include "Plugins/Process/Utility/RegisterInfo_arm64.h"
-#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "Register/Common/RegisterInfo_arm.h"
+#include "Register/Common/RegisterInfo_arm64.h"
+#include "Register/Arch/lldb-arm-register-enums.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_i386.cpp b/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_i386.cpp
index 23daeb88866d3..4139ff02dcb3d 100644
--- a/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_i386.cpp
+++ b/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_i386.cpp
@@ -16,8 +16,8 @@
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_i386.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_i386.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_x86_64.cpp b/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_x86_64.cpp
index 076dc51655872..4fdb5cd1f62c1 100644
--- a/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_x86_64.cpp
+++ b/lldb/unittests/Process/Utility/RegisterInfoNetBSDTest_x86_64.cpp
@@ -16,9 +16,9 @@
 #include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
-#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoNetBSD_x86_64.h"
+#include "Register/Arch/lldb-x86-register-enums.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_i386.h"
+#include "Register/NetBSD/RegisterInfoNetBSD_x86_64.h"
 
 using namespace lldb;
 using namespace lldb_private;
diff --git a/lldb/unittests/Process/Utility/RegisterInfo_x86Test.cpp b/lldb/unittests/Process/Utility/RegisterInfo_x86Test.cpp
index 9a2106ae95e2f..4653836332d99 100644
--- a/lldb/unittests/Process/Utility/RegisterInfo_x86Test.cpp
+++ b/lldb/unittests/Process/Utility/RegisterInfo_x86Test.cpp
@@ -8,7 +8,7 @@
 
 #include "gtest/gtest.h"
 
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/FormatVariadic.h"
diff --git a/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp b/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
index 18fb6ed001ff1..2a3ba654982e1 100644
--- a/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
+++ b/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "Plugins/Process/Utility/RegisterInfoLinux_i386.h"
-#include "Plugins/Process/Utility/RegisterInfoLinux_x86_64.h"
+#include "Register/Linux/RegisterInfoLinux_i386.h"
+#include "Register/Linux/RegisterInfoLinux_x86_64.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_32.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_64.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_ARM.h"
diff --git a/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp b/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
index c52e9a7387e14..d2c258712c1ef 100644
--- a/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
+++ b/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
@@ -11,7 +11,7 @@
 #include "gtest/gtest.h"
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
-#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Register/Arch/RegisterContext_x86.h"
 #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
 #include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
diff --git a/lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp b/lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp
index 12a1d2d015d50..9a8ba3d6de99f 100644
--- a/lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp
+++ b/lldb/unittests/UnwindAssembly/ARM64/TestArm64InstEmulation.cpp
@@ -23,7 +23,7 @@
 #include "Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h"
 #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h"
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
-#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+#include "Register/Arch/lldb-arm64-register-enums.h"
 #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Module.h"
diff --git a/lldb/unittests/UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp b/lldb/unittests/UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp
index 1a528da620779..a8295a7e2edf6 100644
--- a/lldb/unittests/UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp
+++ b/lldb/unittests/UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp
@@ -20,7 +20,7 @@
 
 #include "Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h"
 #include "Plugins/Instruction/PPC64/EmulateInstructionPPC64.h"
-#include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
+#include "Register/Arch/lldb-ppc64le-register-enums.h"
 #include "llvm/Support/TargetSelect.h"
 
 using namespace lldb;
diff --git a/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn b/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn
index 723ae39780051..59c7063500111 100644
--- a/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn
@@ -1,46 +1,8 @@
-static_library("Register") {
-  output_name = "lldbRegister"
-  configs += [ "//llvm/utils/gn/build:lldb_code" ]
-  deps = [
-    "//lldb/source/Utility",
-    "//llvm/lib/Support",
-    "//llvm/lib/TargetParser",
-  ]
-
-  # Uses source-relative includes for own headers.
-  include_dirs = [ "//lldb/source" ]
-  sources = [
-    "RegisterInfoFreeBSD_i386.cpp",
-    "RegisterInfoFreeBSD_powerpc.cpp",
-    "RegisterInfoFreeBSD_x86_64.cpp",
-    "RegisterInfoLinux_i386.cpp",
-    "RegisterInfoLinux_s390x.cpp",
-    "RegisterInfoLinux_x86_64.cpp",
-    "RegisterInfoNetBSD_i386.cpp",
-    "RegisterInfoNetBSD_x86_64.cpp",
-    "RegisterInfoOpenBSD_i386.cpp",
-    "RegisterInfoOpenBSD_x86_64.cpp",
-    "RegisterInfoWindows_i386.cpp",
-    "RegisterInfoWindows_x86_64.cpp",
-    "RegisterContext_x86.cpp",
-    "RegisterInfoDynamic_riscv32.cpp",
-    "RegisterInfo_arm.cpp",
-    "RegisterInfo_arm64.cpp",
-    "RegisterInfo_loongarch64.cpp",
-    "RegisterInfo_ppc64.cpp",
-    "RegisterInfo_ppc64le.cpp",
-    "RegisterInfo_riscv32.cpp",
-    "RegisterInfo_riscv64.cpp",
-    "RegisterInfos_x86_64_with_base_shared.cpp",
-    "RegisterTypeDetector_arm64.cpp",
-  ]
-}
-
 static_library("Utility") {
   output_name = "lldbPluginProcessUtility"
   configs += [ "//llvm/utils/gn/build:lldb_code" ]
   deps = [
-    ":Register",
+    "//lldb/source/Register",
     #"//lldb/source/Breakpoint", # 3-hop dependency cycle.
     "//lldb/source/Core",
     "//lldb/source/DataFormatters",
diff --git a/llvm/utils/gn/secondary/lldb/source/Register/BUILD.gn b/llvm/utils/gn/secondary/lldb/source/Register/BUILD.gn
new file mode 100644
index 0000000000000..26e4970023be0
--- /dev/null
+++ b/llvm/utils/gn/secondary/lldb/source/Register/BUILD.gn
@@ -0,0 +1,37 @@
+static_library("Register") {
+  output_name = "lldbRegister"
+  configs += [ "//llvm/utils/gn/build:lldb_code" ]
+  deps = [
+    "//lldb/source/Utility",
+    "//llvm/lib/Support",
+    "//llvm/lib/TargetParser",
+  ]
+
+  # Uses source-relative includes for own headers.
+  include_dirs = [ "//lldb/source" ]
+  sources = [
+    "Arch/RegisterContext_x86.cpp",
+    "Arch/RegisterInfos_x86_64_with_base_shared.cpp",
+    "Common/RegisterInfoDynamic_riscv32.cpp",
+    "Common/RegisterInfo_arm.cpp",
+    "Common/RegisterInfo_arm64.cpp",
+    "Common/RegisterInfo_loongarch64.cpp",
+    "Common/RegisterInfo_ppc64.cpp",
+    "Common/RegisterInfo_ppc64le.cpp",
+    "Common/RegisterInfo_riscv32.cpp",
+    "Common/RegisterInfo_riscv64.cpp",
+    "Common/RegisterTypeDetector_arm64.cpp",
+    "FreeBSD/RegisterInfoFreeBSD_i386.cpp",
+    "FreeBSD/RegisterInfoFreeBSD_powerpc.cpp",
+    "FreeBSD/RegisterInfoFreeBSD_x86_64.cpp",
+    "Linux/RegisterInfoLinux_i386.cpp",
+    "Linux/RegisterInfoLinux_s390x.cpp",
+    "Linux/RegisterInfoLinux_x86_64.cpp",
+    "NetBSD/RegisterInfoNetBSD_i386.cpp",
+    "NetBSD/RegisterInfoNetBSD_x86_64.cpp",
+    "OpenBSD/RegisterInfoOpenBSD_i386.cpp",
+    "OpenBSD/RegisterInfoOpenBSD_x86_64.cpp",
+    "Windows/RegisterInfoWindows_i386.cpp",
+    "Windows/RegisterInfoWindows_x86_64.cpp",
+  ]
+}



More information about the lldb-commits mailing list