diff options
author | Ed Maste <emaste@freebsd.org> | 2014-02-19 18:34:06 +0000 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2014-02-19 18:34:06 +0000 |
commit | a4be2c5dcd6d488e7c7d2e638759c3cd2b50da2a (patch) | |
tree | 956d07d7590ab180725cc1c24281ff937bbf99a1 | |
parent | 01fd1c60cd909ce4313217532ca40db2cf99886b (diff) | |
download | bcm5719-llvm-a4be2c5dcd6d488e7c7d2e638759c3cd2b50da2a.tar.gz bcm5719-llvm-a4be2c5dcd6d488e7c7d2e638759c3cd2b50da2a.zip |
FreeBSD hardware watchpoint implementation
Implement x86_64 debug register read/write in support of hardware
watchpoints. Hoist LinuxThread::TraceNotify code back into
POSIXThread::TraceNotify()
Patch by John Wolfe.
We still need to rework this later to avoid the #ifdef FreeBSD.
llvm-reviews.chandlerc.com/D2572
llvm.org/pr16706
llvm-svn: 201706
23 files changed, 195 insertions, 70 deletions
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp index 3b260538b19..3d793d0c1c2 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp @@ -101,8 +101,8 @@ PtraceWrapper(int req, lldb::pid_t pid, void *addr, int data, log->Printf("ptrace() failed; errno=%d (%s)", errno, str); } -#ifdef __amd64__ if (log) { +#ifdef __amd64__ if (req == PT_GETREGS) { struct reg *r = (struct reg *) addr; @@ -111,8 +111,15 @@ PtraceWrapper(int req, lldb::pid_t pid, void *addr, int data, log->Printf("PT_GETREGS: bp=0x%lx", r->r_rbp); log->Printf("PT_GETREGS: ax=0x%lx", r->r_rax); } - } #endif + if (req == PT_GETDBREGS || req == PT_SETDBREGS) { + struct dbreg *r = (struct dbreg *) addr; + char setget = (req == PT_GETDBREGS) ? 'G' : 'S'; + + for (int i = 0; i <= 7; i++) + log->Printf("PT_%cETDBREGS: dr[%d]=0x%lx", setget, i, r->dr[i]); + } + } return result; } @@ -348,6 +355,82 @@ WriteRegOperation::Execute(ProcessMonitor *monitor) } //------------------------------------------------------------------------------ +/// @class ReadDebugRegOperation +/// @brief Implements ProcessMonitor::ReadDebugRegisterValue. +class ReadDebugRegOperation : public Operation +{ +public: + ReadDebugRegOperation(lldb::tid_t tid, unsigned offset, unsigned size, + RegisterValue &value, bool &result) + : m_tid(tid), m_offset(offset), m_size(size), + m_value(value), m_result(result) + { } + + void Execute(ProcessMonitor *monitor); + +private: + lldb::tid_t m_tid; + unsigned m_offset; + unsigned m_size; + RegisterValue &m_value; + bool &m_result; +}; + +void +ReadDebugRegOperation::Execute(ProcessMonitor *monitor) +{ + struct dbreg regs; + int rc; + + if ((rc = PTRACE(PT_GETDBREGS, m_tid, (caddr_t)®s, 0)) < 0) { + m_result = false; + } else { + if (m_size == sizeof(uintptr_t)) + m_value = *(uintptr_t *)(((caddr_t)®s) + m_offset); + else + memcpy(&m_value, (((caddr_t)®s) + m_offset), m_size); + m_result = true; + } +} + +//------------------------------------------------------------------------------ +/// @class WriteDebugRegOperation +/// @brief Implements ProcessMonitor::WriteDebugRegisterValue. +class WriteDebugRegOperation : public Operation +{ +public: + WriteDebugRegOperation(lldb::tid_t tid, unsigned offset, + const RegisterValue &value, bool &result) + : m_tid(tid), m_offset(offset), + m_value(value), m_result(result) + { } + + void Execute(ProcessMonitor *monitor); + +private: + lldb::tid_t m_tid; + unsigned m_offset; + const RegisterValue &m_value; + bool &m_result; +}; + +void +WriteDebugRegOperation::Execute(ProcessMonitor *monitor) +{ + struct dbreg regs; + + if (PTRACE(PT_GETDBREGS, m_tid, (caddr_t)®s, 0) < 0) { + m_result = false; + return; + } + *(uintptr_t *)(((caddr_t)®s) + m_offset) = (uintptr_t)m_value.GetAsUInt64(); + if (PTRACE(PT_SETDBREGS, m_tid, (caddr_t)®s, 0) < 0) + m_result = false; + else + m_result = true; +} + +//------------------------------------------------------------------------------ /// @class ReadGPROperation /// @brief Implements ProcessMonitor::ReadGPR. class ReadGPROperation : public Operation @@ -1175,7 +1258,7 @@ ProcessMonitor::MonitorSIGTRAP(ProcessMonitor *monitor, case 0: case TRAP_TRACE: if (log) - log->Printf ("ProcessMonitor::%s() received trace event, tid = %" PRIu64, __FUNCTION__, tid); + log->Printf ("ProcessMonitor::%s() received trace event, tid = %" PRIu64 " : si_code = %d", __FUNCTION__, tid, info->si_code); message = ProcessMessage::Trace(tid); break; @@ -1464,6 +1547,28 @@ ProcessMonitor::WriteRegisterValue(lldb::tid_t tid, unsigned offset, } bool +ProcessMonitor::ReadDebugRegisterValue(lldb::tid_t tid, unsigned offset, + const char *reg_name, unsigned size, + lldb_private::RegisterValue &value) +{ + bool result; + ReadDebugRegOperation op(tid, offset, size, value, result); + DoOperation(&op); + return result; +} + +bool +ProcessMonitor::WriteDebugRegisterValue(lldb::tid_t tid, unsigned offset, + const char *reg_name, + const lldb_private::RegisterValue &value) +{ + bool result; + WriteDebugRegOperation op(tid, offset, value, result); + DoOperation(&op); + return result; +} + +bool ProcessMonitor::ReadGPR(lldb::tid_t tid, void *buf, size_t buf_size) { bool result; diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h index 84bbac16e5e..4c8198fb2e4 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h @@ -116,6 +116,23 @@ public: WriteRegisterValue(lldb::tid_t tid, unsigned offset, const char *reg_name, const lldb_private::RegisterValue &value); + /// Reads the contents from the debug register identified by the given + /// (architecture dependent) offset. + /// + /// This method is provided for use by RegisterContextFreeBSD derivatives. + bool + ReadDebugRegisterValue(lldb::tid_t tid, unsigned offset, + const char *reg_name, unsigned size, + lldb_private::RegisterValue &value); + + /// Writes the given value to the debug register identified by the given + /// (architecture dependent) offset. + /// + /// This method is provided for use by RegisterContextFreeBSD derivatives. + bool + WriteDebugRegisterValue(lldb::tid_t tid, unsigned offset, + const char *reg_name, + const lldb_private::RegisterValue &value); /// Reads all general purpose registers into the specified buffer. bool ReadGPR(lldb::tid_t tid, void *buf, size_t buf_size); diff --git a/lldb/source/Plugins/Process/Linux/LinuxThread.cpp b/lldb/source/Plugins/Process/Linux/LinuxThread.cpp index d69f96f1424..78668e682da 100644 --- a/lldb/source/Plugins/Process/Linux/LinuxThread.cpp +++ b/lldb/source/Plugins/Process/Linux/LinuxThread.cpp @@ -40,24 +40,3 @@ LinuxThread::RefreshStateAfterStop() POSIXThread::RefreshStateAfterStop(); } - -void -LinuxThread::TraceNotify(const ProcessMessage &message) -{ - POSIXBreakpointProtocol* reg_ctx = GetPOSIXBreakpointProtocol(); - if (reg_ctx) - { - uint32_t num_hw_wps = reg_ctx->NumSupportedHardwareWatchpoints(); - uint32_t wp_idx; - for (wp_idx = 0; wp_idx < num_hw_wps; wp_idx++) - { - if (reg_ctx->IsWatchpointHit(wp_idx)) - { - WatchNotify(message); - return; - } - } - } - - POSIXThread::TraceNotify (message); -} diff --git a/lldb/source/Plugins/Process/Linux/LinuxThread.h b/lldb/source/Plugins/Process/Linux/LinuxThread.h index 7d253aa98eb..bcb2cfd0221 100644 --- a/lldb/source/Plugins/Process/Linux/LinuxThread.h +++ b/lldb/source/Plugins/Process/Linux/LinuxThread.h @@ -34,10 +34,6 @@ public: // POSIXThread override virtual void RefreshStateAfterStop(); - -protected: - virtual void - TraceNotify(const ProcessMessage &message); }; #endif // #ifndef liblldb_LinuxThread_H_ diff --git a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp index 8d4c71ff269..cc759eaad96 100644 --- a/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp +++ b/lldb/source/Plugins/Process/POSIX/POSIXThread.cpp @@ -65,7 +65,16 @@ POSIXThread::POSIXThread(Process &process, lldb::tid_t tid) lldb::WatchpointSP wp = wp_list.GetByIndex(wp_idx); if (wp.get() && wp->IsEnabled()) { - assert(EnableHardwareWatchpoint(wp.get())); + // This watchpoint as been enabled; obviously this "new" thread + // has been created since that watchpoint was enabled. Since + // the POSIXBreakpointProtocol has yet to be initialized, its + // m_watchpoints_initialized member will be FALSE. Attempting to + // read the debug status register to determine if a watchpoint + // has been hit would result in the zeroing of that register. + // Since the active debug registers would have been cloned when + // this thread was created, simply force the m_watchpoints_initized + // member to TRUE and avoid resetting dr6 and dr7. + GetPOSIXBreakpointProtocol()->ForceWatchpointsInitialized(); } } } @@ -509,6 +518,21 @@ POSIXThread::WatchNotify(const ProcessMessage &message) void POSIXThread::TraceNotify(const ProcessMessage &message) { + POSIXBreakpointProtocol* reg_ctx = GetPOSIXBreakpointProtocol(); + if (reg_ctx) + { + uint32_t num_hw_wps = reg_ctx->NumSupportedHardwareWatchpoints(); + uint32_t wp_idx; + for (wp_idx = 0; wp_idx < num_hw_wps; wp_idx++) + { + if (reg_ctx->IsWatchpointHit(wp_idx)) + { + WatchNotify(message); + return; + } + } + } + SetStopInfo (StopInfo::CreateStopReasonToTrace(*this)); } diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp index 50ec8d414a1..01c9bb4cde8 100644 --- a/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp +++ b/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_i386.cpp @@ -37,8 +37,18 @@ struct GPR uint32_t gs; }; -#define DR_SIZE 0 -#define DR_OFFSET(reg_index) 0 +struct dbreg { + uint32_t dr[8]; /* debug registers */ + /* Index 0-3: debug address registers */ + /* Index 4-5: reserved */ + /* Index 6: debug status */ + /* Index 7: debug control */ +}; + + +#define DR_SIZE sizeof(uint32_t) +#define DR_OFFSET(reg_index) \ + (LLVM_EXTENSION offsetof(dbreg, dr[reg_index])) //--------------------------------------------------------------------------- // Include RegisterInfos_i386 to declare our g_register_infos_i386 structure. diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp index 471734580ff..2162aaffff1 100644 --- a/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp +++ b/lldb/source/Plugins/Process/POSIX/RegisterContextFreeBSD_x86_64.cpp @@ -46,8 +46,19 @@ typedef struct _GPR uint64_t ss; } GPR; -#define DR_SIZE 0 -#define DR_OFFSET(reg_index) 0 +struct dbreg { + uint64_t dr[16]; /* debug registers */ + /* Index 0-3: debug address registers */ + /* Index 4-5: reserved */ + /* Index 6: debug status */ + /* Index 7: debug control */ + /* Index 8-15: reserved */ +}; + +#define DR_SIZE sizeof(uint64_t) +#define DR_OFFSET(reg_index) \ + (LLVM_EXTENSION offsetof(dbreg, dr[reg_index])) + //--------------------------------------------------------------------------- // Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure. diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIX.h b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIX.h index e48c528403e..600dae73b5b 100644 --- a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIX.h +++ b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIX.h @@ -66,6 +66,10 @@ public: virtual uint32_t NumSupportedHardwareWatchpoints () = 0; + // Force m_watchpoints_initialized to TRUE + void + ForceWatchpointsInitialized () {m_watchpoints_initialized = true;} + protected: bool m_watchpoints_initialized; }; diff --git a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp index f833c9b4752..c446bbfa7dc 100644 --- a/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp +++ b/lldb/source/Plugins/Process/POSIX/RegisterContextPOSIXProcessMonitor_x86.cpp @@ -109,6 +109,15 @@ RegisterContextPOSIXProcessMonitor_x86_64::ReadRegister(const unsigned reg, RegisterValue &value) { ProcessMonitor &monitor = GetMonitor(); + +#if defined(__FreeBSD__) + if (reg >= m_reg_info.first_dr) + return monitor.ReadDebugRegisterValue(m_thread.GetID(), + GetRegisterOffset(reg), + GetRegisterName(reg), + GetRegisterSize(reg), + value); +#endif return monitor.ReadRegisterValue(m_thread.GetID(), GetRegisterOffset(reg), GetRegisterName(reg), @@ -164,6 +173,13 @@ RegisterContextPOSIXProcessMonitor_x86_64::WriteRegister(const unsigned reg, } ProcessMonitor &monitor = GetMonitor(); +#if defined(__FreeBSD__) + if (reg >= m_reg_info.first_dr) + return monitor.WriteDebugRegisterValue(m_thread.GetID(), + GetRegisterOffset(reg_to_write), + GetRegisterName(reg_to_write), + value_to_write); +#endif return monitor.WriteRegisterValue(m_thread.GetID(), GetRegisterOffset(reg_to_write), GetRegisterName(reg_to_write), diff --git a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py index 59a393e5da4..392aec5d28e 100644 --- a/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py +++ b/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py @@ -86,7 +86,6 @@ class ConcurrentEventsTestCase(TestBase): ## Tests for concurrent watchpoint and breakpoint # @dwarf_test - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs def test_watch_break_dwarf(self): @@ -94,7 +93,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -103,7 +101,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=1, num_delay_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -115,7 +112,6 @@ class ConcurrentEventsTestCase(TestBase): # ## Tests for concurrent signal and watchpoint # - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -124,7 +120,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -133,7 +128,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_delay_signal_threads=1, num_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -179,7 +173,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2, num_delay_signal_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -188,7 +181,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_breakpoint_threads=2, num_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -202,7 +194,6 @@ class ConcurrentEventsTestCase(TestBase): # ## Tests for multiple watchpoint threads # - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -211,7 +202,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -221,7 +211,6 @@ class ConcurrentEventsTestCase(TestBase): self.do_thread_actions(num_watchpoint_threads=1, num_delay_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -230,7 +219,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2, num_breakpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -239,7 +227,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_watchpoint_threads=2, num_delay_breakpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -250,7 +237,6 @@ class ConcurrentEventsTestCase(TestBase): num_delay_watchpoint_threads=1, num_breakpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -282,7 +268,6 @@ class ConcurrentEventsTestCase(TestBase): num_watchpoint_threads=5, num_breakpoint_threads=5) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -302,7 +287,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -317,7 +301,6 @@ class ConcurrentEventsTestCase(TestBase): self.buildDwarf(dictionary=self.getBuildFlags()) self.do_thread_actions(num_crash_threads=1, num_signal_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs @@ -329,7 +312,6 @@ class ConcurrentEventsTestCase(TestBase): num_signal_threads=1, num_watchpoint_threads=1) - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test @skipIfRemoteDueToDeadlock @skipIfLinux # llvm.org/pr16714 - LLDB sometimes crashes when setting watchpoints in multithreaded programs diff --git a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py index e66cd0a0b1b..16a3d9d212f 100644 --- a/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py +++ b/lldb/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py @@ -22,7 +22,6 @@ class HelloWatchpointTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" diff --git a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py index bc36d47d66c..fdb85be8bcf 100644 --- a/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py +++ b/lldb/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py @@ -21,7 +21,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.hello_multiple_threads() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @skipIfGcc # causes intermittent gcc debian buildbot failures, skip until we can investigate @dwarf_test def test_watchpoint_multiple_threads_with_dwarf(self): @@ -38,7 +37,6 @@ class WatchpointForMultipleThreadsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.hello_multiple_threads_wp_set_and_then_delete() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @skipIfGcc # causes intermittent gcc debian buildbot failures, skip until we can investigate @dwarf_test def test_watchpoint_multiple_threads_wp_set_and_then_delete_with_dwarf(self): diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py index f0ec916a8c3..bd3bcc4b721 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py @@ -34,7 +34,6 @@ class WatchpointCommandsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.normal_read_write_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_rw_watchpoint_with_dwarf(self): """Test read_write watchpoint and expect to stop two times.""" @@ -50,7 +49,6 @@ class WatchpointCommandsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.delete_read_write_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_rw_watchpoint_delete_with_dwarf(self): """Test delete watchpoint and expect not to stop for watchpoint.""" @@ -66,7 +64,6 @@ class WatchpointCommandsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.ignore_read_write_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_rw_watchpoint_set_ignore_count_with_dwarf(self): """Test watchpoint ignore count and expect to not to stop at all.""" @@ -82,7 +79,6 @@ class WatchpointCommandsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.read_write_watchpoint_disable_after_first_stop() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_rw_disable_after_first_stop__with_dwarf(self): """Test read_write watchpoint but disable it after the first stop.""" @@ -98,7 +94,6 @@ class WatchpointCommandsTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.read_write_watchpoint_disable_then_enable() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_rw_disable_then_enable_with_dwarf(self): """Test read_write watchpoint, disable initially, then enable it.""" diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py index b00a338d3ec..13c9aed9efa 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -33,7 +33,6 @@ class WatchpointLLDBCommandTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.watchpoint_command() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_watchpoint_command_with_dwarf(self): """Test 'watchpoint command'.""" @@ -49,7 +48,6 @@ class WatchpointLLDBCommandTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.watchpoint_command_can_disable_a_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_watchpoint_command_can_disable_a_watchpoint_with_dwarf(self): """Test that 'watchpoint command' action can disable a watchpoint after it is triggered.""" diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py index cfd958109b6..4b09b9fc181 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py @@ -33,7 +33,6 @@ class WatchpointPythonCommandTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.watchpoint_command() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_watchpoint_command_with_dwarf(self): """Test 'watchpoint command'.""" diff --git a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py index b3f6fcf464a..193b6f1f5f7 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py @@ -33,7 +33,6 @@ class WatchpointConditionCmdTestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.watchpoint_condition() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_watchpoint_cond_with_dwarf(self): """Test watchpoint condition.""" diff --git a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py index 119770a72bc..7dd86f25d51 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py @@ -18,7 +18,6 @@ class TestWatchpointEvents (TestBase): self.buildDsym() self.step_over_stepping() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @python_api_test @dwarf_test def test_with_dwarf_and_python_api(self): diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py index de2bd0432c0..f4dd7ab780f 100644 --- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py @@ -28,7 +28,6 @@ class SetWatchpointAPITestCase(TestBase): self.buildDsym() self.do_set_watchpoint() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @python_api_test @dwarf_test def test_watch_val_with_dwarf(self): diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index a6ee56c2ee3..512f1c21095 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -28,7 +28,6 @@ class WatchpointIgnoreCountTestCase(TestBase): self.buildDsym() self.do_watchpoint_ignore_count() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @python_api_test @dwarf_test def test_set_watch_ignore_count_with_dwarf(self): diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py index af6d53cdef0..76514ee4277 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py @@ -28,7 +28,6 @@ class WatchpointIteratorTestCase(TestBase): self.buildDsym() self.do_watchpoint_iter() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @python_api_test @dwarf_test def test_watch_iter_with_dwarf(self): diff --git a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index 42842781974..3c164c5635f 100644 --- a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -33,7 +33,6 @@ class WatchpointConditionAPITestCase(TestBase): self.setTearDownCleanup(dictionary=self.d) self.watchpoint_condition_api() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @dwarf_test def test_watchpoint_cond_api_with_dwarf(self): """Test watchpoint condition API.""" diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index d88c33d6719..fd812432653 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -30,7 +30,6 @@ class SetWatchlocationAPITestCase(TestBase): self.buildDsym() self.do_set_watchlocation() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @skipIfLinux # Sometimes passes, sometimes not. @python_api_test @dwarf_test diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index 781c87451bf..955905679fd 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -30,7 +30,6 @@ class TargetWatchAddressAPITestCase(TestBase): self.buildDsym() self.do_set_watchaddress() - @expectedFailureFreeBSD('llvm.org/pr16706') # Watchpoints fail on FreeBSD @python_api_test @dwarf_test def test_watch_address_with_dwarf(self): |