* gdb.base/stale-infcall.c (infcall): New label test-next.
(main): New labels test-pass and test-fail.
* gdb.base/stale-infcall.exp: Continue to test-next. Put breakpoint
$test_fail_bpnum to test-fail.
(test system longjmp tracking support): New test.
Delete $test_fail_bpnum.
* lib/gdb.exp (gdb_continue_to_breakpoint): Accept also Temporary
breakpoint.
+2012-07-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/stale-infcall.c (infcall): New label test-next.
+ (main): New labels test-pass and test-fail.
+ * gdb.base/stale-infcall.exp: Continue to test-next. Put breakpoint
+ $test_fail_bpnum to test-fail.
+ (test system longjmp tracking support): New test.
+ Delete $test_fail_bpnum.
+ * lib/gdb.exp (gdb_continue_to_breakpoint): Accept also Temporary
+ breakpoint.
+
2012-06-30 Doug Evans <dje@google.com>
* gdb.dwarf2/fission-reread.S: New file.
void
infcall (void)
{
- longjmp (jmp, 1);
+ longjmp (jmp, 1); /* test-next */
}
static void
int
main ()
{
- if (setjmp (jmp) == 0)
+ if (setjmp (jmp) == 0) /* test-pass */
+ infcall ();
+
+ if (setjmp (jmp) == 0) /* test-fail */
run1 ();
else
run2 ();
return -1
}
+gdb_breakpoint [gdb_get_line_number "test-next"] temporary
+gdb_continue_to_breakpoint "test-next" ".* test-next .*"
+gdb_breakpoint [gdb_get_line_number "test-fail"]
+gdb_test_no_output {set $test_fail_bpnum=$bpnum}
+
+set test "test system longjmp tracking support"
+gdb_test_multiple "next" $test {
+ -re " test-pass .*\r\n$gdb_prompt $" {
+ pass $test
+ }
+ -re " test-fail .*\r\n$gdb_prompt $" {
+ xfail $test
+ untested "System lacks support for tracking longjmps"
+ return -1
+ }
+}
+gdb_test_no_output {delete $test_fail_bpnum}
+
gdb_breakpoint [gdb_get_line_number "break-run1"]
gdb_breakpoint [gdb_get_line_number "break-run2"]
gdb_breakpoint [gdb_get_line_number "break-exit"]
send_gdb "continue\n"
gdb_expect {
- -re "Breakpoint .* (at|in) $location_pattern\r\n$gdb_prompt $" {
+ -re "(?:Breakpoint|Temporary breakpoint) .* (at|in) $location_pattern\r\n$gdb_prompt $" {
pass $full_name
}
-re ".*$gdb_prompt $" {