* gdb.base/break.c (main): Move position of malloc.

* gdb.base/break.exp: Revert mistaken checkin.
This commit is contained in:
Nathan Sidwell 2006-11-29 08:02:07 +00:00
parent ae09783548
commit d394c9935d
3 changed files with 6 additions and 16 deletions

View File

@ -1,6 +1,7 @@
2006-11-28 Nathan Sidwell <nathan@codesourcery.com>
2006-11-29 Nathan Sidwell <nathan@codesourcery.com>
* gdb.base/break.c (main): Move position of malloc.
* gdb.base/break.exp: Revert mistaken checkin.
2006-11-28 Vladimir Prus <vladimir@codesourcery.com>

View File

@ -87,10 +87,6 @@ char *argv[], **envp;
set_debug_traps(); /* set breakpoint 5 here */
breakpoint();
#endif
/* We're used by a test that requires malloc, so make sure it is
in the executable. */
(void)malloc (1);
if (argc == 12345) { /* an unlikely value < 2^16, in case uninited */ /* set breakpoint 6 here */
fprintf (stderr, "usage: factorial <number>\n");
return 1;
@ -101,6 +97,10 @@ char *argv[], **envp;
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 */
} /* set breakpoint 10a here */

View File

@ -180,17 +180,6 @@ set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
verbose -log "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2 at .*$srcfile1:($bp_location8|$bp_location9).*
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial$proto at .*$srcfile:$bp_location7.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location2.*
\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_if_conditional at .*$srcfile:$bp_location3.*
\[0-9\]+\[\t \]+breakpoint keep y.* in multi_line_while_conditional at .*$srcfile:$bp_location4" \
2
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$main_line.*