+2014-11-12 Pedro Alves <palves@redhat.com>
+
+ * linux-low.c (linux_request_interrupt): Always send a SIGINT to
+ the process group instead of to a specific LWP.
+
2014-10-15 Pedro Alves <palves@redhat.com>
PR server/17487
{
extern unsigned long signal_pid;
- if (!ptid_equal (cont_thread, null_ptid)
- && !ptid_equal (cont_thread, minus_one_ptid))
- {
- int lwpid;
-
- lwpid = lwpid_of (current_thread);
- kill_lwp (lwpid, SIGINT);
- }
- else
- kill_lwp (signal_pid, SIGINT);
+ /* Send a SIGINT to the process group. This acts just like the user
+ typed a ^C on the controlling terminal. */
+ kill (-signal_pid, SIGINT);
}
/* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET
2014-11-12 Pedro Alves <palves@redhat.com>
+ * gdb.threads/leader-exit.exp: Test sending ctrl-c works after the
+ leader has exited.
+
+2014-11-12 Pedro Alves <palves@redhat.com>
+
* gdb.arch/i386-bp_permanent.c: New file.
* gdb.arch/i386-bp_permanent.exp: Don't skip on x86_64.
(srcfile): Set to i386-bp_permanent.c.
i = pthread_join (main_thread, NULL);
assert (i == 0);
- return arg; /* break-here */
+ sleep (10); /* break-here */
+ return arg;
}
int
gdb_test "info threads" \
"\r\n\[ \t\]*Id\[ \t\]+Target\[ \t\]+Id\[ \t\]+Frame\[ \t\]*\r\n\\* 2 *Thread \[^\r\n\]* at \[^\r\n\]*" \
"Single thread has been left"
+
+# Test that ctrl-c works even if the leader has exited.
+
+set test "continue for ctrl-c"
+gdb_test_multiple "continue" $test {
+ -re "Continuing" {
+ pass $test
+ }
+}
+
+sleep 1
+
+send_gdb "\003"
+
+set test "caught interrupt"
+gdb_test_multiple "" $test {
+ -re "Program received signal SIGINT.*$gdb_prompt $" {
+ pass $test
+ }
+}