diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1fac1e3aad..57583c23a2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-03-30 Yao Qi + + * gdb.reverse/until-precsave.exp: Match function name only. + * gdb.reverse/until-reverse.c (main): Don't call fprintf nor printf. + Move malloc to a condition block. + * gdb.reverse/until-reverse.exp: Match function name only. + 2016-03-29 Marcin Koƛcielnicki * gdb.trace/ftrace.exp: Set arg0exp for s390. diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index b5afa52272..f06b6622d0 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -91,7 +91,7 @@ gdb_test "until $bp_location19" \ # Finish out to main scope # gdb_test "finish" \ - " in main .*$srcfile:$bp_location1.*" \ + "main .*$srcfile:.*" \ "finish to main" # Advance to a function called by main (marker2) diff --git a/gdb/testsuite/gdb.reverse/until-reverse.c b/gdb/testsuite/gdb.reverse/until-reverse.c index 51f949e6e7..d3311b7827 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.c +++ b/gdb/testsuite/gdb.reverse/until-reverse.c @@ -33,19 +33,20 @@ int factorial(int); int main (int argc, char **argv, char **envp) { - if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */ - fprintf (stderr, "usage: factorial \n"); - return 1; + if (argc == 12345) + { + /* We're used by a test that requires malloc, so make sure it is + in the executable. */ + (void) malloc (1); + return 1; } - printf ("%d\n", factorial (atoi ("6"))); /* set breakpoint 1 here */ + + factorial (atoi ("6")); /* set breakpoint 1 here */ /* set breakpoint 12 here */ marker1 (); /* set breakpoint 11 here */ marker2 (43); /* set breakpoint 20 here */ marker3 ("stack", "trace"); /* set breakpoint 21 here */ marker4 (177601976L); - /* We're used by a test that requires malloc, so make sure it is - in the executable. */ - (void)malloc (1); argc = (argc == 12345); /* This is silly, but we can step off of it */ /* set breakpoint 2 here */ return argc; /* set breakpoint 10 here */ diff --git a/gdb/testsuite/gdb.reverse/until-reverse.exp b/gdb/testsuite/gdb.reverse/until-reverse.exp index 07193a82a4..07870f672b 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.exp +++ b/gdb/testsuite/gdb.reverse/until-reverse.exp @@ -64,7 +64,7 @@ gdb_test "until $bp_location19" \ # Finish out to main scope # gdb_test "finish" \ - " in main .*$srcfile:$bp_location1.*" \ + "main .*$srcfile:.*" \ "finish to main" # Advance to a function called by main (marker2)