diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeProcessFreeBSD.cpp @@ -217,10 +217,8 @@ if (info.pl_lwpid > 0) { for (const auto &t : m_threads) { - if (t->GetID() == static_cast(info.pl_lwpid)) { + if (t->GetID() == static_cast(info.pl_lwpid)) thread = static_cast(t.get()); - break; - } static_cast(t.get())->SetStoppedWithNoReason(); } if (!thread) @@ -240,8 +238,27 @@ SetState(StateType::eStateStopped, true); break; case TRAP_TRACE: - if (thread) + if (thread) { + auto ®ctx = static_cast( + thread->GetRegisterContext()); + uint32_t wp_index = LLDB_INVALID_INDEX32; + Status error = + regctx.GetWatchpointHitIndex(wp_index, LLDB_INVALID_ADDRESS); + if (error.Fail()) + LLDB_LOG(log, + "received error while checking for watchpoint hits, pid = " + "{0}, LWP = {1}, error = {2}", + pid, info.pl_lwpid, error); + if (wp_index != LLDB_INVALID_INDEX32) { + regctx.ClearWatchpointHit(wp_index); + thread->SetStoppedByWatchpoint(wp_index); + SetState(StateType::eStateStopped, true); + break; + } + thread->SetStoppedByTrace(); + } + SetState(StateType::eStateStopped, true); break; } diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h @@ -18,11 +18,9 @@ class NativeProcessFreeBSD; -class NativeRegisterContextFreeBSD : public NativeRegisterContextRegisterInfo { +class NativeRegisterContextFreeBSD + : public virtual NativeRegisterContextRegisterInfo { public: - NativeRegisterContextFreeBSD(NativeThreadProtocol &native_thread, - RegisterInfoInterface *reg_info_interface_p); - // This function is implemented in the NativeRegisterContextFreeBSD_* // subclasses to create a new instance of the host specific // NativeRegisterContextFreeBSD. The implementations can't collide as only one @@ -31,10 +29,6 @@ static NativeRegisterContextFreeBSD * CreateHostNativeRegisterContextFreeBSD(const ArchSpec &target_arch, NativeThreadProtocol &native_thread); - virtual Status - CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) = 0; - - virtual Status ClearWatchpointHit(uint32_t wp_index) = 0; protected: virtual NativeProcessFreeBSD &GetProcess(); diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.cpp --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.cpp @@ -20,11 +20,6 @@ #include // clang-format on -NativeRegisterContextFreeBSD::NativeRegisterContextFreeBSD( - NativeThreadProtocol &native_thread, - RegisterInfoInterface *reg_info_interface_p) - : NativeRegisterContextRegisterInfo(native_thread, reg_info_interface_p) {} - NativeProcessFreeBSD &NativeRegisterContextFreeBSD::GetProcess() { return static_cast(m_thread.GetProcess()); } diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.h b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.h --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.h +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.h @@ -20,6 +20,7 @@ #include "Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD.h" #include "Plugins/Process/Utility/RegisterContext_x86.h" +#include "Plugins/Process/Utility/NativeRegisterContextWatchpoint_x86.h" #include "Plugins/Process/Utility/lldb-x86-register-enums.h" #define LLDB_INVALID_XSAVE_OFFSET UINT32_MAX @@ -30,7 +31,8 @@ class NativeProcessFreeBSD; class NativeRegisterContextFreeBSD_x86_64 - : public NativeRegisterContextFreeBSD { + : public NativeRegisterContextFreeBSD, + public NativeRegisterContextWatchpoint_x86 { public: NativeRegisterContextFreeBSD_x86_64(const ArchSpec &target_arch, NativeThreadProtocol &native_thread); @@ -48,33 +50,6 @@ Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; - Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override; - - Status GetWatchpointHitIndex(uint32_t &wp_index, - lldb::addr_t trap_addr) override; - - Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override; - - bool ClearHardwareWatchpoint(uint32_t wp_index) override; - - Status ClearWatchpointHit(uint32_t wp_index) override; - - Status ClearAllHardwareWatchpoints() override; - - Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, - uint32_t watch_flags, - uint32_t wp_index); - - uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, - uint32_t watch_flags) override; - - lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override; - - uint32_t NumSupportedHardwareWatchpoints() override; - - Status - CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override; - private: // Private member types. enum { GPRegSet, FPRegSet, XSaveRegSet, DBRegSet }; diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeRegisterContextFreeBSD_x86_64.cpp @@ -246,8 +246,8 @@ NativeRegisterContextFreeBSD_x86_64::NativeRegisterContextFreeBSD_x86_64( const ArchSpec &target_arch, NativeThreadProtocol &native_thread) - : NativeRegisterContextFreeBSD(native_thread, - CreateRegisterInfoInterface(target_arch)), + : NativeRegisterContextRegisterInfo( + native_thread, CreateRegisterInfoInterface(target_arch)), m_gpr(), m_fpr(), m_dbr() {} // CONSIDER after local and llgs debugging are merged, register set support can @@ -1169,251 +1169,4 @@ } } -Status NativeRegisterContextFreeBSD_x86_64::IsWatchpointHit(uint32_t wp_index, - bool &is_hit) { - if (wp_index >= NumSupportedHardwareWatchpoints()) - return Status("Watchpoint index out of range"); - - RegisterValue reg_value; - const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(GetDR(6)); - Status error = ReadRegister(reg_info, reg_value); - if (error.Fail()) { - is_hit = false; - return error; - } - - uint64_t status_bits = reg_value.GetAsUInt64(); - - is_hit = status_bits & (1 << wp_index); - - return error; -} - -Status NativeRegisterContextFreeBSD_x86_64::GetWatchpointHitIndex( - uint32_t &wp_index, lldb::addr_t trap_addr) { - uint32_t num_hw_wps = NumSupportedHardwareWatchpoints(); - for (wp_index = 0; wp_index < num_hw_wps; ++wp_index) { - bool is_hit; - Status error = IsWatchpointHit(wp_index, is_hit); - if (error.Fail()) { - wp_index = LLDB_INVALID_INDEX32; - return error; - } else if (is_hit) { - return error; - } - } - wp_index = LLDB_INVALID_INDEX32; - return Status(); -} - -Status -NativeRegisterContextFreeBSD_x86_64::IsWatchpointVacant(uint32_t wp_index, - bool &is_vacant) { - if (wp_index >= NumSupportedHardwareWatchpoints()) - return Status("Watchpoint index out of range"); - - RegisterValue reg_value; - const RegisterInfo *const reg_info = GetRegisterInfoAtIndex(GetDR(7)); - Status error = ReadRegister(reg_info, reg_value); - if (error.Fail()) { - is_vacant = false; - return error; - } - - uint64_t control_bits = reg_value.GetAsUInt64(); - - is_vacant = !(control_bits & (1 << (2 * wp_index + 1))); - - return error; -} - -Status NativeRegisterContextFreeBSD_x86_64::SetHardwareWatchpointWithIndex( - lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) { - - if (wp_index >= NumSupportedHardwareWatchpoints()) - return Status("Watchpoint index out of range"); - - // Read only watchpoints aren't supported on x86_64. Fall back to read/write - // waitchpoints instead. - // TODO: Add logic to detect when a write happens and ignore that watchpoint - // hit. - if (watch_flags == 0x2) - watch_flags = 0x3; - - if (watch_flags != 0x1 && watch_flags != 0x3) - return Status("Invalid read/write bits for watchpoint"); - - if (size != 1 && size != 2 && size != 4 && size != 8) - return Status("Invalid size for watchpoint"); - - bool is_vacant; - Status error = IsWatchpointVacant(wp_index, is_vacant); - if (error.Fail()) - return error; - if (!is_vacant) - return Status("Watchpoint index not vacant"); - - const RegisterInfo *const reg_info_dr7 = GetRegisterInfoAtIndex(GetDR(7)); - RegisterValue dr7_value; - error = ReadRegister(reg_info_dr7, dr7_value); - if (error.Fail()) - return error; - - // for watchpoints 0, 1, 2, or 3, respectively, set bits 1, 3, 5, or 7 - uint64_t enable_bit = 1 << (2 * wp_index + 1); - - // set bits 16-17, 20-21, 24-25, or 28-29 - // with 0b01 for write, and 0b11 for read/write - uint64_t rw_bits = watch_flags << (16 + 4 * wp_index); - - // set bits 18-19, 22-23, 26-27, or 30-31 - // with 0b00, 0b01, 0b10, or 0b11 - // for 1, 2, 8 (if supported), or 4 bytes, respectively - uint64_t size_bits = (size == 8 ? 0x2 : size - 1) << (18 + 4 * wp_index); - - uint64_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index)); - - uint64_t control_bits = dr7_value.GetAsUInt64() & ~bit_mask; - - control_bits |= enable_bit | rw_bits | size_bits; - - const RegisterInfo *const reg_info_drN = - GetRegisterInfoAtIndex(GetDR(wp_index)); - RegisterValue drN_value; - error = ReadRegister(reg_info_drN, drN_value); - if (error.Fail()) - return error; - - // clear dr6 if address or bits changed (i.e. we're not reenabling the same - // watchpoint) - if (drN_value.GetAsUInt64() != addr || - (dr7_value.GetAsUInt64() & bit_mask) != (rw_bits | size_bits)) { - ClearWatchpointHit(wp_index); - - error = WriteRegister(reg_info_drN, RegisterValue(addr)); - if (error.Fail()) - return error; - } - - error = WriteRegister(reg_info_dr7, RegisterValue(control_bits)); - if (error.Fail()) - return error; - - error.Clear(); - return error; -} - -bool NativeRegisterContextFreeBSD_x86_64::ClearHardwareWatchpoint( - uint32_t wp_index) { - if (wp_index >= NumSupportedHardwareWatchpoints()) - return false; - - // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0-1, 2-3, 4-5 - // or 6-7 of the debug control register (DR7) - const RegisterInfo *const reg_info_dr7 = GetRegisterInfoAtIndex(GetDR(7)); - RegisterValue reg_value; - Status error = ReadRegister(reg_info_dr7, reg_value); - if (error.Fail()) - return false; - uint64_t bit_mask = 0x3 << (2 * wp_index); - uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask; - - return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success(); -} - -Status -NativeRegisterContextFreeBSD_x86_64::ClearWatchpointHit(uint32_t wp_index) { - if (wp_index >= NumSupportedHardwareWatchpoints()) - return Status("Watchpoint index out of range"); - - // for watchpoints 0, 1, 2, or 3, respectively, check bits 0, 1, 2, or 3 of - // the debug status register (DR6) - const RegisterInfo *const reg_info_dr6 = GetRegisterInfoAtIndex(GetDR(6)); - RegisterValue reg_value; - Status error = ReadRegister(reg_info_dr6, reg_value); - if (error.Fail()) - return error; - - uint64_t bit_mask = 1 << wp_index; - uint64_t status_bits = reg_value.GetAsUInt64() & ~bit_mask; - return WriteRegister(reg_info_dr6, RegisterValue(status_bits)); -} - -Status NativeRegisterContextFreeBSD_x86_64::ClearAllHardwareWatchpoints() { - RegisterValue reg_value; - - // clear bits {0-4} of the debug status register (DR6) - const RegisterInfo *const reg_info_dr6 = GetRegisterInfoAtIndex(GetDR(6)); - Status error = ReadRegister(reg_info_dr6, reg_value); - if (error.Fail()) - return error; - uint64_t bit_mask = 0xF; - uint64_t status_bits = reg_value.GetAsUInt64() & ~bit_mask; - error = WriteRegister(reg_info_dr6, RegisterValue(status_bits)); - if (error.Fail()) - return error; - - // clear bits {0-7,16-31} of the debug control register (DR7) - const RegisterInfo *const reg_info_dr7 = GetRegisterInfoAtIndex(GetDR(7)); - error = ReadRegister(reg_info_dr7, reg_value); - if (error.Fail()) - return error; - bit_mask = 0xFF | (0xFFFF << 16); - uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask; - return WriteRegister(reg_info_dr7, RegisterValue(control_bits)); -} - -uint32_t NativeRegisterContextFreeBSD_x86_64::SetHardwareWatchpoint( - lldb::addr_t addr, size_t size, uint32_t watch_flags) { - Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS)); - const uint32_t num_hw_watchpoints = NumSupportedHardwareWatchpoints(); - for (uint32_t wp_index = 0; wp_index < num_hw_watchpoints; ++wp_index) { - bool is_vacant; - Status error = IsWatchpointVacant(wp_index, is_vacant); - if (is_vacant) { - error = SetHardwareWatchpointWithIndex(addr, size, watch_flags, wp_index); - if (error.Success()) - return wp_index; - } - if (error.Fail() && log) { - LLDB_LOGF(log, "NativeRegisterContextFreeBSD_x86_64::%s Error: %s", - __FUNCTION__, error.AsCString()); - } - } - return LLDB_INVALID_INDEX32; -} - -lldb::addr_t -NativeRegisterContextFreeBSD_x86_64::GetWatchpointAddress(uint32_t wp_index) { - if (wp_index >= NumSupportedHardwareWatchpoints()) - return LLDB_INVALID_ADDRESS; - RegisterValue reg_value; - const RegisterInfo *const reg_info_drN = - GetRegisterInfoAtIndex(GetDR(wp_index)); - if (ReadRegister(reg_info_drN, reg_value).Fail()) - return LLDB_INVALID_ADDRESS; - return reg_value.GetAsUInt64(); -} - -uint32_t -NativeRegisterContextFreeBSD_x86_64::NumSupportedHardwareWatchpoints() { - // Available debug address registers: dr0, dr1, dr2, dr3 - return 4; -} - -Status NativeRegisterContextFreeBSD_x86_64::CopyHardwareWatchpointsFrom( - NativeRegisterContextFreeBSD &source) { - auto &r_source = static_cast(source); - Status res = r_source.ReadRegisterSet(DBRegSet); - if (!res.Fail()) { - // copy dbregs only if any watchpoints were set - if ((r_source.m_dbr.dr[7] & 0xFF) == 0) - return res; - - m_dbr = r_source.m_dbr; - res = WriteRegisterSet(DBRegSet); - } - return res; -} - #endif // defined(__x86_64__) diff --git a/lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp --- a/lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSDRemote/NativeThreadFreeBSD.cpp @@ -109,7 +109,18 @@ } void NativeThreadFreeBSD::SetStoppedByWatchpoint(uint32_t wp_index) { + lldbassert(wp_index != LLDB_INVALID_INDEX32 && "wp_index cannot be invalid"); + + std::ostringstream ostr; + ostr << GetRegisterContext().GetWatchpointAddress(wp_index) << " "; + ostr << wp_index; + + ostr << " " << GetRegisterContext().GetWatchpointHitAddress(wp_index); + SetStopped(); + m_stop_description = ostr.str(); + m_stop_info.reason = StopReason::eStopReasonWatchpoint; + m_stop_info.details.signal.signo = SIGTRAP; } void NativeThreadFreeBSD::SetStoppedWithNoReason() { @@ -176,26 +187,45 @@ Status NativeThreadFreeBSD::SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) { - return Status("not implemented"); + assert(m_state == eStateStopped); + if (!hardware) + return Status("not implemented"); + Status error = RemoveWatchpoint(addr); + if (error.Fail()) + return error; + uint32_t wp_index = + GetRegisterContext().SetHardwareWatchpoint(addr, size, watch_flags); + if (wp_index == LLDB_INVALID_INDEX32) + return Status("Setting hardware watchpoint failed."); + m_watchpoint_index_map.insert({addr, wp_index}); + return Status(); } Status NativeThreadFreeBSD::RemoveWatchpoint(lldb::addr_t addr) { auto wp = m_watchpoint_index_map.find(addr); if (wp == m_watchpoint_index_map.end()) return Status(); - return Status("not implemented"); + uint32_t wp_index = wp->second; + m_watchpoint_index_map.erase(wp); + if (GetRegisterContext().ClearHardwareWatchpoint(wp_index)) + return Status(); + return Status("Clearing hardware watchpoint failed."); } Status NativeThreadFreeBSD::SetHardwareBreakpoint(lldb::addr_t addr, size_t size) { - if (m_state == eStateLaunching) - return Status(); - + assert(m_state == eStateStopped); Status error = RemoveHardwareBreakpoint(addr); if (error.Fail()) return error; - return Status("not implemented"); + uint32_t bp_index = GetRegisterContext().SetHardwareBreakpoint(addr, size); + + if (bp_index == LLDB_INVALID_INDEX32) + return Status("Setting hardware breakpoint failed."); + + m_hw_break_index_map.insert({addr, bp_index}); + return Status(); } Status NativeThreadFreeBSD::RemoveHardwareBreakpoint(lldb::addr_t addr) { @@ -203,9 +233,11 @@ if (bp == m_hw_break_index_map.end()) return Status(); - return Status("not implemented"); -} + uint32_t bp_index = bp->second; + if (GetRegisterContext().ClearHardwareBreakpoint(bp_index)) { + m_hw_break_index_map.erase(bp); + return Status(); + } -Status NativeThreadFreeBSD::CopyWatchpointsFrom(NativeThreadFreeBSD &source) { - return Status("not implemented"); + return Status("Clearing hardware breakpoint failed."); } diff --git a/lldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py b/lldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py --- a/lldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py +++ b/lldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -32,7 +32,6 @@ self.exe_name = self.testMethodName self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name} - @skipIfFreeBSD # timing out on buildbot def test_watchpoint_command(self): """Test 'watchpoint command'.""" self.build(dictionary=self.d) @@ -95,7 +94,6 @@ self.expect("frame variable --show-globals cookie", substrs=['(int32_t)', 'cookie = 777']) - @skipIfFreeBSD # timing out on buildbot @skipIfReproducer def test_continue_in_watchpoint_command(self): """Test continue in a watchpoint command.""" diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py @@ -12,7 +12,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') def test(self): diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @expectedFailureNetBSD diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py --- a/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py +++ b/lldb/test/API/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py @@ -11,7 +11,6 @@ mydir = ConcurrentEventsBase.compute_mydir(__file__) - @skipIfFreeBSD # timing out on buildbot # Atomic sequences are not supported yet for MIPS in LLDB. @skipIf(triple='^mips') @add_test_categories(["watchpoint"]) diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -257,3 +257,8 @@ # testFormat: The test format to use to interpret tests. config.test_format = lldbtest.LLDBTest(dotest_cmd) + +# Propagate FREEBSD_REMOTE_PLUGIN +if 'FREEBSD_REMOTE_PLUGIN' in os.environ: + config.environment['FREEBSD_REMOTE_PLUGIN'] = os.environ[ + 'FREEBSD_REMOTE_PLUGIN']