https://github.com/mchoo7 updated https://github.com/llvm/llvm-project/pull/179582
>From 9a2bdb299bf607286df770519a6c63e41e2ecc10 Mon Sep 17 00:00:00 2001 From: Minsoo Choo <[email protected]> Date: Tue, 3 Feb 2026 18:37:51 -0500 Subject: [PATCH 1/2] [lldb] [Process/FreeBSD] Remove mips64 support Signed-off-by: Minsoo Choo <[email protected]> --- .../Plugins/Process/FreeBSD/CMakeLists.txt | 1 - .../Process/FreeBSD/NativeProcessFreeBSD.cpp | 4 - .../Process/FreeBSD/NativeProcessFreeBSD.h | 2 - .../NativeRegisterContextFreeBSD_mips64.cpp | 240 ------------------ .../NativeRegisterContextFreeBSD_mips64.h | 75 ------ 5 files changed, 322 deletions(-) delete mode 100644 lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp delete mode 100644 lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h diff --git a/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt b/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt index 4c11d21b3e5ae..8574df58b4ada 100644 --- a/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt +++ b/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt @@ -3,7 +3,6 @@ add_lldb_library(lldbPluginProcessFreeBSD NativeRegisterContextFreeBSD.cpp NativeRegisterContextFreeBSD_arm.cpp NativeRegisterContextFreeBSD_arm64.cpp - NativeRegisterContextFreeBSD_mips64.cpp NativeRegisterContextFreeBSD_powerpc.cpp NativeRegisterContextFreeBSD_x86_64.cpp NativeThreadFreeBSD.cpp diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp index c434a3a91ffe3..7dd3d807d2096 100644 --- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp @@ -996,10 +996,6 @@ Status NativeProcessFreeBSD::ReinitializeThreads() { return error; } -bool NativeProcessFreeBSD::SupportHardwareSingleStepping() const { - return !m_arch.IsMIPS(); -} - void NativeProcessFreeBSD::MonitorClone(::pid_t child_pid, bool is_vfork, NativeThreadFreeBSD &parent_thread) { Log *log = GetLog(POSIXLog::Process); diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h index a6ecc5ce3ca16..fb7372817265d 100644 --- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h +++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h @@ -90,8 +90,6 @@ class NativeProcessFreeBSD : public NativeProcessELF, static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr, int data = 0, int *result = nullptr); - bool SupportHardwareSingleStepping() const; - llvm::Expected<std::string> SaveCore(llvm::StringRef path_hint) override; protected: diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp deleted file mode 100644 index 2e0f5b707884f..0000000000000 --- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp +++ /dev/null @@ -1,240 +0,0 @@ -//===-- NativeRegisterContextFreeBSD_mips64.cpp ---------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#if defined(__mips64__) - -#include "NativeRegisterContextFreeBSD_mips64.h" - -#include "lldb/Utility/DataBufferHeap.h" -#include "lldb/Utility/RegisterValue.h" -#include "lldb/Utility/Status.h" - -#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h" -#include "Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h" - -// clang-format off -#include <sys/param.h> -#include <sys/ptrace.h> -#include <sys/types.h> -// clang-format on -#include <optional> - -using namespace lldb; -using namespace lldb_private; -using namespace lldb_private::process_freebsd; - -NativeRegisterContextFreeBSD * -NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD( - const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread) { - return new NativeRegisterContextFreeBSD_mips64(target_arch, native_thread); -} - -NativeRegisterContextFreeBSD_mips64::NativeRegisterContextFreeBSD_mips64( - const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread) - : NativeRegisterContextRegisterInfo( - native_thread, new RegisterContextFreeBSD_mips64(target_arch)) {} - -RegisterContextFreeBSD_mips64 & -NativeRegisterContextFreeBSD_mips64::GetRegisterInfo() const { - return static_cast<RegisterContextFreeBSD_mips64 &>( - *m_register_info_interface_up); -} - -uint32_t NativeRegisterContextFreeBSD_mips64::GetRegisterSetCount() const { - return GetRegisterInfo().GetRegisterSetCount(); -} - -const RegisterSet * -NativeRegisterContextFreeBSD_mips64::GetRegisterSet(uint32_t set_index) const { - return GetRegisterInfo().GetRegisterSet(set_index); -} - -uint32_t NativeRegisterContextFreeBSD_mips64::GetUserRegisterCount() const { - uint32_t count = 0; - for (uint32_t set_index = 0; set_index < GetRegisterSetCount(); ++set_index) - count += GetRegisterSet(set_index)->num_registers; - return count; -} - -std::optional<NativeRegisterContextFreeBSD_mips64::RegSetKind> -NativeRegisterContextFreeBSD_mips64::GetSetForNativeRegNum( - uint32_t reg_num) const { - switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) { - case llvm::Triple::mips64: - if (reg_num >= k_first_gpr_mips64 && reg_num <= k_last_gpr_mips64) - return GPRegSet; - if (reg_num >= k_first_fpr_mips64 && reg_num <= k_last_fpr_mips64) - return FPRegSet; - break; - default: - llvm_unreachable("Unhandled target architecture."); - } - - llvm_unreachable("Register does not belong to any register set"); -} - -Status NativeRegisterContextFreeBSD_mips64::ReadRegisterSet(RegSetKind set) { - switch (set) { - case GPRegSet: - return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(), - m_reg_data.data()); - case FPRegSet: - return NativeProcessFreeBSD::PtraceWrapper( - PT_GETFPREGS, m_thread.GetID(), - m_reg_data.data() + GetRegisterInfo().GetGPRSize()); - } - llvm_unreachable("NativeRegisterContextFreeBSD_mips64::ReadRegisterSet"); -} - -Status NativeRegisterContextFreeBSD_mips64::WriteRegisterSet(RegSetKind set) { - switch (set) { - case GPRegSet: - return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(), - m_reg_data.data()); - case FPRegSet: - return NativeProcessFreeBSD::PtraceWrapper( - PT_SETFPREGS, m_thread.GetID(), - m_reg_data.data() + GetRegisterInfo().GetGPRSize()); - } - llvm_unreachable("NativeRegisterContextFreeBSD_mips64::WriteRegisterSet"); -} - -Status -NativeRegisterContextFreeBSD_mips64::ReadRegister(const RegisterInfo *reg_info, - RegisterValue ®_value) { - Status error; - - if (!reg_info) { - error = Status::FromErrorString("reg_info NULL"); - return error; - } - - const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB]; - - if (reg == LLDB_INVALID_REGNUM) - return Status("no lldb regnum for %s", reg_info && reg_info->name - ? reg_info->name - : "<unknown register>"); - - std::optional<RegSetKind> opt_set = GetSetForNativeRegNum(reg); - if (!opt_set) { - // This is likely an internal register for lldb use only and should not be - // directly queried. - error = Status::FromErrorStringWithFormat( - "register \"%s\" is in unrecognized set", reg_info->name); - return error; - } - - RegSetKind set = *opt_set; - error = ReadRegisterSet(set); - if (error.Fail()) - return error; - - assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size()); - reg_value.SetBytes(m_reg_data.data() + reg_info->byte_offset, - reg_info->byte_size, endian::InlHostByteOrder()); - return error; -} - -Status NativeRegisterContextFreeBSD_mips64::WriteRegister( - const RegisterInfo *reg_info, const RegisterValue ®_value) { - Status error; - - if (!reg_info) - return Status("reg_info NULL"); - - const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB]; - - if (reg == LLDB_INVALID_REGNUM) - return Status("no lldb regnum for %s", reg_info && reg_info->name - ? reg_info->name - : "<unknown register>"); - - std::optional<RegSetKind> opt_set = GetSetForNativeRegNum(reg); - if (!opt_set) { - // This is likely an internal register for lldb use only and should not be - // directly queried. - error = Status::FromErrorStringWithFormat( - "register \"%s\" is in unrecognized set", reg_info->name); - return error; - } - - RegSetKind set = *opt_set; - error = ReadRegisterSet(set); - if (error.Fail()) - return error; - - assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size()); - ::memcpy(m_reg_data.data() + reg_info->byte_offset, reg_value.GetBytes(), - reg_info->byte_size); - - return WriteRegisterSet(set); -} - -Status NativeRegisterContextFreeBSD_mips64::ReadAllRegisterValues( - lldb::WritableDataBufferSP &data_sp) { - Status error; - - error = ReadRegisterSet(GPRegSet); - if (error.Fail()) - return error; - - error = ReadRegisterSet(FPRegSet); - if (error.Fail()) - return error; - - data_sp.reset(new DataBufferHeap(m_reg_data.size(), 0)); - uint8_t *dst = data_sp->GetBytes(); - ::memcpy(dst, m_reg_data.data(), m_reg_data.size()); - - return error; -} - -Status NativeRegisterContextFreeBSD_mips64::WriteAllRegisterValues( - const lldb::DataBufferSP &data_sp) { - Status error; - - if (!data_sp) { - error = Status::FromErrorStringWithFormat( - "NativeRegisterContextFreeBSD_mips64::%s invalid data_sp provided", - __FUNCTION__); - return error; - } - - if (data_sp->GetByteSize() != m_reg_data.size()) { - error = Status::FromErrorStringWithFormat( - "NativeRegisterContextFreeBSD_mips64::%s data_sp contained mismatched " - "data size, expected %" PRIu64 ", actual %" PRIu64, - __FUNCTION__, m_reg_data.size(), data_sp->GetByteSize()); - return error; - } - - const uint8_t *src = data_sp->GetBytes(); - if (src == nullptr) { - error = Status::FromErrorStringWithFormat( - "NativeRegisterContextFreeBSD_mips64::%s " - "DataBuffer::GetBytes() returned a null " - "pointer", - __FUNCTION__); - return error; - } - ::memcpy(m_reg_data.data(), src, m_reg_data.size()); - - error = WriteRegisterSet(GPRegSet); - if (error.Fail()) - return error; - - return WriteRegisterSet(FPRegSet); -} - -llvm::Error NativeRegisterContextFreeBSD_mips64::CopyHardwareWatchpointsFrom( - NativeRegisterContextFreeBSD &source) { - return llvm::Error::success(); -} - -#endif // defined (__mips64__) diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h deleted file mode 100644 index 286b4fd8d8b99..0000000000000 --- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h +++ /dev/null @@ -1,75 +0,0 @@ -//===-- NativeRegisterContextFreeBSD_mips64.h -------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#if defined(__mips64__) - -#ifndef lldb_NativeRegisterContextFreeBSD_mips64_h -#define lldb_NativeRegisterContextFreeBSD_mips64_h - -// clang-format off -#include <sys/types.h> -#include <machine/reg.h> -// clang-format on - -#include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h" -#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h" - -#include <array> -#include <optional> - -namespace lldb_private { -namespace process_freebsd { - -class NativeProcessFreeBSD; - -class NativeRegisterContextFreeBSD_mips64 - : public NativeRegisterContextFreeBSD { -public: - NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch, - NativeThreadFreeBSD &native_thread); - - uint32_t GetRegisterSetCount() const override; - - uint32_t GetUserRegisterCount() const override; - - const RegisterSet *GetRegisterSet(uint32_t set_index) const override; - - Status ReadRegister(const RegisterInfo *reg_info, - RegisterValue ®_value) override; - - Status WriteRegister(const RegisterInfo *reg_info, - const RegisterValue ®_value) override; - - Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override; - - Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; - - llvm::Error - CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override; - -private: - enum RegSetKind { - GPRegSet, - FPRegSet, - }; - std::array<uint8_t, sizeof(reg) + sizeof(fpreg)> m_reg_data; - - std::optional<RegSetKind> GetSetForNativeRegNum(uint32_t reg_num) const; - - Status ReadRegisterSet(RegSetKind set); - Status WriteRegisterSet(RegSetKind set); - - RegisterContextFreeBSD_mips64 &GetRegisterInfo() const; -}; - -} // namespace process_freebsd -} // namespace lldb_private - -#endif // #ifndef lldb_NativeRegisterContextFreeBSD_mips64_h - -#endif // defined (__mips64__) >From 2e82a464d1e88fa6b0c5fac80e175a8dad345021 Mon Sep 17 00:00:00 2001 From: Minsoo Choo <[email protected]> Date: Tue, 3 Feb 2026 18:38:39 -0500 Subject: [PATCH 2/2] [lldb] [Process/Utility] Remove mips64 support Signed-off-by: Minsoo Choo <[email protected]> --- .../Plugins/Process/Utility/CMakeLists.txt | 1 - .../Utility/RegisterContextFreeBSD_mips64.cpp | 179 ------------------ .../Utility/RegisterContextFreeBSD_mips64.h | 30 --- .../Utility/RegisterContextPOSIX_mips64.cpp | 9 +- .../Utility/RegisterContextPOSIX_mips64.h | 2 +- .../Process/elf-core/ThreadElfCore.cpp | 4 - 6 files changed, 3 insertions(+), 222 deletions(-) delete mode 100644 lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp delete mode 100644 lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h diff --git a/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/lldb/source/Plugins/Process/Utility/CMakeLists.txt index b1e326ec064e4..e69193a47bbd4 100644 --- a/lldb/source/Plugins/Process/Utility/CMakeLists.txt +++ b/lldb/source/Plugins/Process/Utility/CMakeLists.txt @@ -27,7 +27,6 @@ add_lldb_library(lldbPluginProcessUtility RegisterContextDarwin_x86_64.cpp RegisterContextDummy.cpp RegisterContextFreeBSD_i386.cpp - RegisterContextFreeBSD_mips64.cpp RegisterContextFreeBSD_powerpc.cpp RegisterContextFreeBSD_x86_64.cpp RegisterContextHistory.cpp diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp deleted file mode 100644 index 1f52c09df12e7..0000000000000 --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp +++ /dev/null @@ -1,179 +0,0 @@ -//===-- RegisterContextFreeBSD_mips64.cpp ---------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===---------------------------------------------------------------------===// - -#include "RegisterContextFreeBSD_mips64.h" -#include "RegisterContextPOSIX_mips64.h" -#include "lldb-mips-freebsd-register-enums.h" -#include <vector> - -using namespace lldb_private; -using namespace lldb; - -static const uint32_t g_gp_regnums_mips64[] = { - gpr_zero_mips64, gpr_r1_mips64, gpr_r2_mips64, gpr_r3_mips64, - gpr_r4_mips64, gpr_r5_mips64, gpr_r6_mips64, gpr_r7_mips64, - gpr_r8_mips64, gpr_r9_mips64, gpr_r10_mips64, gpr_r11_mips64, - gpr_r12_mips64, gpr_r13_mips64, gpr_r14_mips64, gpr_r15_mips64, - gpr_r16_mips64, gpr_r17_mips64, gpr_r18_mips64, gpr_r19_mips64, - gpr_r20_mips64, gpr_r21_mips64, gpr_r22_mips64, gpr_r23_mips64, - gpr_r24_mips64, gpr_r25_mips64, gpr_r26_mips64, gpr_r27_mips64, - gpr_gp_mips64, gpr_sp_mips64, gpr_r30_mips64, gpr_ra_mips64, - gpr_sr_mips64, gpr_mullo_mips64, gpr_mulhi_mips64, gpr_badvaddr_mips64, - gpr_cause_mips64, gpr_pc_mips64, gpr_ic_mips64, gpr_dummy_mips64, - LLDB_INVALID_REGNUM // register sets need to end with this flag -}; - -static_assert((sizeof(g_gp_regnums_mips64) / sizeof(g_gp_regnums_mips64[0])) - - 1 == - k_num_gpr_registers_mips64, - "g_gp_regnums_mips64 has wrong number of register infos"); - -const uint32_t g_fp_regnums_mips64[] = { - fpr_f0_mips64, fpr_f1_mips64, fpr_f2_mips64, fpr_f3_mips64, - fpr_f4_mips64, fpr_f5_mips64, fpr_f6_mips64, fpr_f7_mips64, - fpr_f8_mips64, fpr_f9_mips64, fpr_f10_mips64, fpr_f11_mips64, - fpr_f12_mips64, fpr_f13_mips64, fpr_f14_mips64, fpr_f15_mips64, - fpr_f16_mips64, fpr_f17_mips64, fpr_f18_mips64, fpr_f19_mips64, - fpr_f20_mips64, fpr_f21_mips64, fpr_f22_mips64, fpr_f23_mips64, - fpr_f24_mips64, fpr_f25_mips64, fpr_f26_mips64, fpr_f27_mips64, - fpr_f28_mips64, fpr_f29_mips64, fpr_f30_mips64, fpr_f31_mips64, - fpr_fcsr_mips64, fpr_fir_mips64, - LLDB_INVALID_REGNUM // register sets need to end with this flag -}; - -static_assert((sizeof(g_fp_regnums_mips64) / sizeof(g_fp_regnums_mips64[0])) - - 1 == - k_num_fpr_registers_mips64, - "g_fp_regnums_mips64 has wrong number of register infos"); - -// Number of register sets provided by this context. -constexpr size_t k_num_register_sets = 2; - -static const RegisterSet g_reg_sets_mips64[k_num_register_sets] = { - {"General Purpose Registers", "gpr", k_num_gpr_registers_mips64, - g_gp_regnums_mips64}, - {"Floating Point Registers", "fpu", k_num_fpr_registers_mips64, - g_fp_regnums_mips64}, -}; - -// http://svnweb.freebsd.org/base/head/sys/mips/include/regnum.h -typedef struct _GPR { - uint64_t zero; - uint64_t r1; - uint64_t r2; - uint64_t r3; - uint64_t r4; - uint64_t r5; - uint64_t r6; - uint64_t r7; - uint64_t r8; - uint64_t r9; - uint64_t r10; - uint64_t r11; - uint64_t r12; - uint64_t r13; - uint64_t r14; - uint64_t r15; - uint64_t r16; - uint64_t r17; - uint64_t r18; - uint64_t r19; - uint64_t r20; - uint64_t r21; - uint64_t r22; - uint64_t r23; - uint64_t r24; - uint64_t r25; - uint64_t r26; - uint64_t r27; - uint64_t gp; - uint64_t sp; - uint64_t r30; - uint64_t ra; - uint64_t sr; - uint64_t mullo; - uint64_t mulhi; - uint64_t badvaddr; - uint64_t cause; - uint64_t pc; - uint64_t ic; - uint64_t dummy; -} GPR_freebsd_mips; - -typedef struct _FPR { - uint64_t f0; - uint64_t f1; - uint64_t f2; - uint64_t f3; - uint64_t f4; - uint64_t f5; - uint64_t f6; - uint64_t f7; - uint64_t f8; - uint64_t f9; - uint64_t f10; - uint64_t f11; - uint64_t f12; - uint64_t f13; - uint64_t f14; - uint64_t f15; - uint64_t f16; - uint64_t f17; - uint64_t f18; - uint64_t f19; - uint64_t f20; - uint64_t f21; - uint64_t f22; - uint64_t f23; - uint64_t f24; - uint64_t f25; - uint64_t f26; - uint64_t f27; - uint64_t f28; - uint64_t f29; - uint64_t f30; - uint64_t f31; - uint64_t fcsr; - uint64_t fir; -} FPR_freebsd_mips; - -// Include RegisterInfos_mips64 to declare our g_register_infos_mips64 -// structure. -#define DECLARE_REGISTER_INFOS_MIPS64_STRUCT -#include "RegisterInfos_mips64.h" -#undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT - -RegisterContextFreeBSD_mips64::RegisterContextFreeBSD_mips64( - const ArchSpec &target_arch) - : RegisterInfoInterface(target_arch) {} - -size_t RegisterContextFreeBSD_mips64::GetGPRSize() const { - return sizeof(GPR_freebsd_mips); -} - -const RegisterSet * -RegisterContextFreeBSD_mips64::GetRegisterSet(size_t set) const { - // Check if RegisterSet is available - if (set < k_num_register_sets) - return &g_reg_sets_mips64[set]; - return nullptr; -} - -size_t RegisterContextFreeBSD_mips64::GetRegisterSetCount() const { - return k_num_register_sets; -} - -const RegisterInfo *RegisterContextFreeBSD_mips64::GetRegisterInfo() const { - assert(GetTargetArchitecture().GetCore() == ArchSpec::eCore_mips64); - return g_register_infos_mips64; -} - -uint32_t RegisterContextFreeBSD_mips64::GetRegisterCount() const { - return static_cast<uint32_t>(sizeof(g_register_infos_mips64) / - sizeof(g_register_infos_mips64[0])); -} diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h deleted file mode 100644 index 39968eacf4755..0000000000000 --- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h +++ /dev/null @@ -1,30 +0,0 @@ -//===-- RegisterContextFreeBSD_mips64.h -------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTFREEBSD_MIPS64_H -#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTFREEBSD_MIPS64_H - -#include "RegisterInfoInterface.h" - -class RegisterContextFreeBSD_mips64 - : public lldb_private::RegisterInfoInterface { -public: - RegisterContextFreeBSD_mips64(const lldb_private::ArchSpec &target_arch); - - size_t GetGPRSize() const override; - - const lldb_private::RegisterSet *GetRegisterSet(size_t set) const; - - size_t GetRegisterSetCount() const; - - const lldb_private::RegisterInfo *GetRegisterInfo() const override; - - uint32_t GetRegisterCount() const override; -}; - -#endif diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp index 3685d6ac72ad3..0b8bc93bbb788 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp @@ -21,7 +21,6 @@ #include "llvm/Support/Compiler.h" #include "RegisterContextPOSIX_mips64.h" -#include "RegisterContextFreeBSD_mips64.h" using namespace lldb_private; using namespace lldb; @@ -98,15 +97,11 @@ RegisterContextPOSIX_mips64::GetRegisterInfoAtIndex(size_t reg) { } size_t RegisterContextPOSIX_mips64::GetRegisterSetCount() { - const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>( - m_register_info_up.get()); - return context->GetRegisterSetCount(); + return register_set_count; } const RegisterSet *RegisterContextPOSIX_mips64::GetRegisterSet(size_t set) { - const auto *context = static_cast<const RegisterContextFreeBSD_mips64 *>( - m_register_info_up.get()); - return context->GetRegisterSet(set); + return nullptr; } const char *RegisterContextPOSIX_mips64::GetRegisterName(unsigned reg) { diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h index b66dc3f445249..bfb68927233d1 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h @@ -57,7 +57,7 @@ class RegisterContextPOSIX_mips64 : public lldb_private::RegisterContext { uint32_t m_num_registers; uint8_t m_registers_count[register_set_count]; std::unique_ptr<lldb_private::RegisterInfoInterface> - m_register_info_up; // Register Info Interface (FreeBSD or Linux) + m_register_info_up; // Register Info Interface (Linux) // Determines if an extended register set is supported on the processor // running the inferior process. diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp index 7015c3c65cc7d..4e4eb9274d1f3 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp @@ -17,7 +17,6 @@ #include "lldb/Utility/ProcessInfo.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_i386.h" -#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h" #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h" #include "Plugins/Process/Utility/RegisterContextLinux_i386.h" @@ -99,9 +98,6 @@ ThreadElfCore::CreateRegisterContextForFrame(StackFrame *frame) { case llvm::Triple::ppc64le: reg_interface = new RegisterContextFreeBSD_powerpc64(arch); break; - case llvm::Triple::mips64: - reg_interface = new RegisterContextFreeBSD_mips64(arch); - break; case llvm::Triple::x86: reg_interface = new RegisterContextFreeBSD_i386(arch); break; _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
