Author: Minsoo Choo Date: 2026-02-06T08:59:46-05:00 New Revision: bc706338c11af35d17af996409fd804f92a51207
URL: https://github.com/llvm/llvm-project/commit/bc706338c11af35d17af996409fd804f92a51207 DIFF: https://github.com/llvm/llvm-project/commit/bc706338c11af35d17af996409fd804f92a51207.diff LOG: [lldb] [Process/FreeBSD] Assume minimum is FreeBSD 14 (#179587) Currently versions under 13 are EOLed (see [FreeBSD Release Information](https://www.freebsd.org/releases/)). FreeBSD 13 will be EOLed by April 30th (see [Supported FreeBSD releases](https://www.freebsd.org/security/#sup)) while LLVM 23 is expected to be released in August 25th according to the LLVM calendar. Thus assumed that minimum supported FreeBSD version is 14. Signed-off-by: Minsoo Choo <[email protected]> Added: Modified: lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h llvm/docs/ReleaseNotes.md Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp index d21dac221aa22..f50b28e2ebd1d 100644 --- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.cpp @@ -54,12 +54,8 @@ NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD( NativeRegisterContextFreeBSD_arm64::NativeRegisterContextFreeBSD_arm64( const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread) : NativeRegisterContextRegisterInfo( - native_thread, new RegisterInfoPOSIX_arm64(target_arch, 0)) -#ifdef LLDB_HAS_FREEBSD_WATCHPOINT - , - m_read_dbreg(false) -#endif -{ + native_thread, new RegisterInfoPOSIX_arm64(target_arch, 0)), + m_read_dbreg(false) { g_register_flags_detector.UpdateRegisterInfo( GetRegisterInfoInterface().GetRegisterInfo(), GetRegisterInfoInterface().GetRegisterCount()); @@ -225,7 +221,6 @@ Status NativeRegisterContextFreeBSD_arm64::WriteAllRegisterValues( llvm::Error NativeRegisterContextFreeBSD_arm64::CopyHardwareWatchpointsFrom( NativeRegisterContextFreeBSD &source) { -#ifdef LLDB_HAS_FREEBSD_WATCHPOINT auto &r_source = static_cast<NativeRegisterContextFreeBSD_arm64 &>(source); llvm::Error error = r_source.ReadHardwareDebugInfo(); if (error) @@ -240,13 +235,9 @@ llvm::Error NativeRegisterContextFreeBSD_arm64::CopyHardwareWatchpointsFrom( // on FreeBSD this writes both breakpoints and watchpoints return WriteHardwareDebugRegs(eDREGTypeWATCH); -#else - return llvm::Error::success(); -#endif } llvm::Error NativeRegisterContextFreeBSD_arm64::ReadHardwareDebugInfo() { -#ifdef LLDB_HAS_FREEBSD_WATCHPOINT Log *log = GetLog(POSIXLog::Registers); // we're fully stateful, so no need to reread control registers ever @@ -267,16 +258,10 @@ llvm::Error NativeRegisterContextFreeBSD_arm64::ReadHardwareDebugInfo() { m_read_dbreg = true; return llvm::Error::success(); -#else - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "Hardware breakpoints/watchpoints require FreeBSD 14.0"); -#endif } llvm::Error NativeRegisterContextFreeBSD_arm64::WriteHardwareDebugRegs(DREGType) { -#ifdef LLDB_HAS_FREEBSD_WATCHPOINT assert(m_read_dbreg && "dbregs must be read before writing them back"); // copy data from m_*_regs to m_dbreg before writing it back @@ -292,11 +277,6 @@ NativeRegisterContextFreeBSD_arm64::WriteHardwareDebugRegs(DREGType) { return NativeProcessFreeBSD::PtraceWrapper(PT_SETDBREGS, m_thread.GetID(), &m_dbreg) .ToError(); -#else - return llvm::createStringError( - llvm::inconvertibleErrorCode(), - "Hardware breakpoints/watchpoints require FreeBSD 14.0"); -#endif } #endif // defined (__aarch64__) diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h index 80ed328f08bdf..20cbd643e95cf 100644 --- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h +++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_arm64.h @@ -23,10 +23,6 @@ #include <array> -#if __FreeBSD_version >= 1300139 -#define LLDB_HAS_FREEBSD_WATCHPOINT 1 -#endif - namespace lldb_private { namespace process_freebsd { @@ -64,10 +60,8 @@ class NativeRegisterContextFreeBSD_arm64 // and sizes, so we do not have to worry about these (and we have // a unittest to assert that). std::array<uint8_t, sizeof(reg) + sizeof(fpreg)> m_reg_data; -#ifdef LLDB_HAS_FREEBSD_WATCHPOINT dbreg m_dbreg; bool m_read_dbreg; -#endif Status ReadRegisterSet(uint32_t set); Status WriteRegisterSet(uint32_t set); diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md index 555cf6102b39a..8dabcecf3ece8 100644 --- a/llvm/docs/ReleaseNotes.md +++ b/llvm/docs/ReleaseNotes.md @@ -178,6 +178,8 @@ Changes to LLDB --------------- * Support for FreeBSD on MIPS64 has been removed. +* The minimum assumed version of FreeBSD is now 14. The effect of which is that watchpoints are + assumed to be supported. Changes to BOLT --------------- _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
