Index: test/functionalities/signal/TestSendSignal.py =================================================================== --- test/functionalities/signal/TestSendSignal.py +++ test/functionalities/signal/TestSendSignal.py @@ -100,7 +100,7 @@ self.match_state(process_listener, lldb.eStateRunning) # Now signal the process, and make sure it stops: - process.Signal(signal.SIGUSR1) + process.Signal(lldbutil.get_signal_number('SIGUSR1')) self.match_state(process_listener, lldb.eStateStopped) @@ -110,7 +110,8 @@ thread = threads[0] self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.") - self.assertTrue(thread.GetStopReasonDataAtIndex(0) == signal.SIGUSR1, "The stop signal was SIGUSR1") + self.assertTrue(thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'), + "The stop signal was SIGUSR1") if __name__ == '__main__': import atexit Index: test/tools/lldb-server/TestLldbGdbServer.py =================================================================== --- test/tools/lldb-server/TestLldbGdbServer.py +++ test/tools/lldb-server/TestLldbGdbServer.py @@ -825,8 +825,8 @@ # Continue sending the signal number to the continue thread. # The commented out packet is a way to do this same operation without using # a $Hc (but this test is testing $Hc, so we'll stick with the former). - "read packet: $C{0:x}#00".format(signal.SIGUSR1), - # "read packet: $vCont;C{0:x}:{1:x};c#00".format(signal.SIGUSR1, thread_id), + "read packet: $C{0:x}#00".format(lldbutil.get_signal_number('SIGUSR1')), + # "read packet: $vCont;C{0:x}:{1:x};c#00".format(lldbutil.get_signal_number('SIGUSR1'), thread_id), # FIXME: Linux does not report the thread stop on the delivered signal (SIGUSR1 here). MacOSX debugserver does. # But MacOSX debugserver isn't guaranteeing the thread the signal handler runs on, so currently its an XFAIL. @@ -845,8 +845,8 @@ # Ensure the stop signal is the signal we delivered. # stop_signo = context.get("stop_signo") # self.assertIsNotNone(stop_signo) - # self.assertEquals(int(stop_signo,16), signal.SIGUSR1) - + # self.assertEquals(int(stop_signo,16), lldbutil.get_signal_number('SIGUSR1')) + # Ensure the stop thread is the thread to which we delivered the signal. # stop_thread_id = context.get("stop_thread_id") # self.assertIsNotNone(stop_thread_id) @@ -883,7 +883,7 @@ self.init_llgs_test() self.buildDwarf() self.set_inferior_startup_launch() - self.Hc_then_Csignal_signals_correct_thread(signal.SIGSEGV) + self.Hc_then_Csignal_signals_correct_thread(lldbutil.get_signal_number('SIGSEGV')) def m_packet_reads_memory(self): # This is the memory we will write into the inferior and then ensure we can read back with $m. @@ -1219,7 +1219,7 @@ # Verify the stop signal reported was the breakpoint signal number. stop_signo = context.get("stop_signo") self.assertIsNotNone(stop_signo) - self.assertEquals(int(stop_signo,16), signal.SIGTRAP) + self.assertEquals(int(stop_signo,16), lldbutil.get_signal_number('SIGTRAP')) # Ensure we did not receive any output. If the breakpoint was not set, we would # see output (from a launched process with captured stdio) printing a hello, world message. Index: test/tools/lldb-server/gdbremote_testcase.py =================================================================== --- test/tools/lldb-server/gdbremote_testcase.py +++ test/tools/lldb-server/gdbremote_testcase.py @@ -1147,7 +1147,8 @@ context = self.expect_gdbremote_sequence() self.assertIsNotNone(context) self.assertIsNotNone(context.get("stop_signo")) - self.assertEquals(int(context.get("stop_signo"), 16), signal.SIGTRAP) + self.assertEquals(int(context.get("stop_signo"), 16), + lldbutil.get_signal_number('SIGTRAP')) single_step_count += 1