+2013-05-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Do not
+ ignore SIGINT and SIGTRAP in case these internal signals are
+ caught explicitely.
+
2013-05-01 Joel Brobecker <brobecker@adacore.com>
* darwin-nat.c (darwin_read_write_inferior): Change types
VEC_iterate (gdb_signal_type, c->signals_to_be_caught, i, iter);
i++)
if (signal_number == iter)
- break;
+ return 1;
/* Not the same. */
- if (!iter)
- return 0;
+ gdb_assert (!iter);
+ return 0;
}
-
- return c->catch_all || !INTERNAL_SIGNAL (signal_number);
+ else
+ return c->catch_all || !INTERNAL_SIGNAL (signal_number);
}
/* Implement the "print_it" breakpoint_ops method for signal
+2013-05-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * gdb.base/catch-sig.c (main): Raise SIGINT.
+ * gdb.base/catch-sig.exp: Test "catch signal SIGINT".
+
2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
* status-stop.exp (test_tstart_tstart): Check for error
raise (SIGHUP); /* third HUP */
raise (SIGHUP); /* fourth HUP */
+
+ raise (SIGINT); /* first INT */
}
gdb_breakpoint ${srcfile}:[gdb_get_line_number "fourth HUP"]
gdb_continue_to_breakpoint "fourth HUP"
delete_breakpoints
+
+ # Verify an internal signal used by gdb is properly caught.
+ gdb_breakpoint ${srcfile}:[gdb_get_line_number "first INT"]
+ gdb_continue_to_breakpoint "first INT"
+ set test "override SIGINT to catch"
+ gdb_test "handle SIGINT nostop print nopass" \
+ "SIGINT.*No.*Yes.*No.*" \
+ "$test" \
+ "SIGINT is used by the debugger.*Are you sure you want to change it.*y or n.*" \
+ y
+ gdb_test "catch signal SIGINT" "Catchpoint .*"
+ gdb_test "continue" "Catchpoint .* SIGINT.*"
+
}
}