Author: mgorny Date: Thu Jul 25 13:27:40 2019 New Revision: 367047 URL: http://llvm.org/viewvc/llvm-project?rev=367047&view=rev Log: [lldb] [Process/NetBSD] Report stopped process on SIGSTOP
Mark the process as stopped when SIGSTOP arrives. This is necessary for lldb-server to generate correct response to 'process interrupt', and therefore to prevent the whole stack crashing when process is stopped. Thanks to Pavel Labath for the tip. Differential Revision: https://reviews.llvm.org/D65289 Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py lldb/trunk/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py Thu Jul 25 13:27:40 2019 @@ -26,7 +26,6 @@ class ExprCommandThatRestartsTestCase(Te @skipIfFreeBSD # llvm.org/pr19246: intermittent failure @skipIfDarwin # llvm.org/pr19246: intermittent failure @skipIfWindows # Test relies on signals, unsupported on Windows - @expectedFailureNetBSD @expectedFlakeyAndroid(bugnumber="llvm.org/pr19246") def test(self): """Test calling function that hits a signal and restarts.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py Thu Jul 25 13:27:40 2019 @@ -27,7 +27,6 @@ class ExprCommandWithTimeoutsTestCase(Te oslist=[ "windows"], bugnumber="llvm.org/pr21765") - @expectedFailureNetBSD def test(self): """Test calling std::String member function.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py Thu Jul 25 13:27:40 2019 @@ -26,7 +26,6 @@ class SendSignalTestCase(TestBase): oslist=['freebsd'], bugnumber="llvm.org/pr23318: does not report running state") @skipIfWindows # Windows does not support signals - @expectedFailureNetBSD def test_with_run_command(self): """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process.""" self.build() Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py Thu Jul 25 13:27:40 2019 @@ -194,7 +194,6 @@ class ThreadStateTestCase(TestBase): oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly") @skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237> - @expectedFailureNetBSD @no_debug_info_test def test_process_interrupt(self): """Test process interrupt and continue.""" Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py Thu Jul 25 13:27:40 2019 @@ -61,7 +61,6 @@ class TestVSCode_launch(lldbvscode_testc @skipIfWindows @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots - @expectedFailureNetBSD @no_debug_info_test def test_cwd(self): ''' @@ -90,7 +89,6 @@ class TestVSCode_launch(lldbvscode_testc @skipIfWindows @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots - @expectedFailureNetBSD @no_debug_info_test def test_debuggerRoot(self): ''' Modified: lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp?rev=367047&r1=367046&r2=367047&view=diff ============================================================================== --- lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp (original) +++ lldb/trunk/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp Thu Jul 25 13:27:40 2019 @@ -195,6 +195,7 @@ void NativeProcessNetBSD::MonitorSIGSTOP SIGSTOP, &info.psi_siginfo); } } + SetState(StateType::eStateStopped, true); } } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits