Skip to content
Permalink
Browse files

[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

llvm-svn: 367047
  • Loading branch information...
mgorny committed Jul 25, 2019
1 parent aa20595 commit e1c159e86ac2f109d0d4d9342721ce78532660cf
@@ -26,7 +26,6 @@ def setUp(self):
@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."""
@@ -27,7 +27,6 @@ def setUp(self):
oslist=[
"windows"],
bugnumber="llvm.org/pr21765")
@expectedFailureNetBSD
def test(self):
"""Test calling std::String member function."""
self.build()
@@ -26,7 +26,6 @@ def setUp(self):
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()
@@ -194,7 +194,6 @@ def thread_state_after_expression_test(self):
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."""
@@ -61,7 +61,6 @@ def test_stopOnEntry(self):

@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 @@ def test_cwd(self):

@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):
'''
@@ -195,6 +195,7 @@ void NativeProcessNetBSD::MonitorSIGSTOP(lldb::pid_t pid) {
SIGSTOP, &info.psi_siginfo);
}
}
SetState(StateType::eStateStopped, true);
}
}

0 comments on commit e1c159e

Please sign in to comment.
You can’t perform that action at this time.