[Lldb-commits] [lldb] 427bb1c - [lldb] Remove mips64 support for FreeBSD (#179582)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 5 07:07:32 PST 2026
Author: Minsoo Choo
Date: 2026-02-05T15:07:27Z
New Revision: 427bb1cc1b09ea68b8a13a667810681ba4074f6b
URL: https://github.com/llvm/llvm-project/commit/427bb1cc1b09ea68b8a13a667810681ba4074f6b
DIFF: https://github.com/llvm/llvm-project/commit/427bb1cc1b09ea68b8a13a667810681ba4074f6b.diff
LOG: [lldb] Remove mips64 support for FreeBSD (#179582)
The last FreeBSD version supporting mips64 is FreeBSD 13 which will be
EOLed on April 30th. LLVM 23.1.0 release is expected to be August 25th
according to the LLVM calendar. The usage of mips64 is less noticeable
so it's hard to know if it is properly working, and even if it works, it
is hard to test new features on FreeBSD mips64.
Thus, remove support for mips64 on FreeBSD.
---------
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
Added:
Modified:
lldb/docs/index.rst
lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt
lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
lldb/source/Plugins/Process/Utility/CMakeLists.txt
lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp
lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h
lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
llvm/docs/ReleaseNotes.md
Removed:
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
################################################################################
diff --git a/lldb/docs/index.rst b/lldb/docs/index.rst
index 6dea61a246a48..10683c7593b01 100644
--- a/lldb/docs/index.rst
+++ b/lldb/docs/index.rst
@@ -73,7 +73,7 @@ are welcome:
* iOS, tvOS, and watchOS simulator debugging on i386, x86_64 and AArch64
* iOS, tvOS, and watchOS device debugging on ARM and AArch64
* Linux user-space debugging for i386, x86_64, ARM, AArch64, PPC64le, s390x
-* FreeBSD user-space debugging for i386, x86_64, ARM, AArch64, MIPS64, PPC
+* FreeBSD user-space debugging for i386, x86_64, ARM, AArch64, PPC
* FreeBSD kernel debugging for i386, x86_64, AArch64
* NetBSD user-space debugging for i386 and x86_64
* Windows user-space debugging for i386, x86_64, ARM and AArch64 (*)
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__)
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 8bc4e09870fce..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},
-};
-
-// https://cgit.freebsd.org/src/tree/sys/mips/include/regnum.h?h=stable/13
-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;
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 6252f39610f69..555cf6102b39a 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -177,6 +177,8 @@ Changes to the LLVM tools
Changes to LLDB
---------------
+* Support for FreeBSD on MIPS64 has been removed.
+
Changes to BOLT
---------------
More information about the lldb-commits
mailing list