RFA: use temporary breakpoints in restore.exp

Fernando Nasser fnasser@redhat.com
Mon Sep 17 11:09:00 GMT 2001


Jim Blandy wrote:
> 
> 2001-09-13  Jim Blandy  <jimb@redhat.com>
> 
>         * gdb.base/restore.exp: Use temporary breakpoints, to avoid
>         overflowing the limited breakpoint tables on some ROM monitors
>         (like the ROM68K).
> 

Nice!

Please check it in.

Thanks!

Fernando

> Index: gdb/testsuite/gdb.base/restore.exp
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.base/restore.exp,v
> retrieving revision 1.2
> diff -c -r1.2 restore.exp
> *** gdb/testsuite/gdb.base/restore.exp  1999/09/08 01:44:26     1.2
> --- gdb/testsuite/gdb.base/restore.exp  2001/09/13 23:50:23
> ***************
> *** 44,71 ****
> 
>       set limit 5
> 
> -     # Set breakpoints at each of the `caller' functions.
> -     for {set c 1} {$c <= $limit} {incr c} {
> -       gdb_test "break caller$c" "Breakpoint.*\[0-9\]*\\." "break caller$c"
> -     }
> -
> -     # Set breakpoints at each of the `callee' functions.
> -     for {set c 1} {$c <= $limit} {incr c} {
> -       gdb_test "break callee$c" "Breakpoint.*\[0-9\]*\\." "break caller$c"
> -     }
> -
>       # For each caller function,
>       #   call each of the callee functions,
>       #   force a return from the callee, and
>       #   make sure that the local variables still have the right values.
>       for {set c 1} {$c <= $limit} {incr c} {
> 
>         # Continue to the next caller function.
>         gdb_test "continue" ".*/\\* caller$c \\*/" "run to caller$c"
> 
>         # Do each callee function.
>           for {set e 1} {$e <= $limit} {incr e} {
> !           gdb_test "  continue" ".*/\\* callee$e \\*/" "run to callee$e"
> 
>               # Do a forced return from the callee.
>             send_gdb "return 0\n"
> --- 44,68 ----
> 
>       set limit 5
> 
>       # For each caller function,
>       #   call each of the callee functions,
>       #   force a return from the callee, and
>       #   make sure that the local variables still have the right values.
>       for {set c 1} {$c <= $limit} {incr c} {
> 
> +         # Set a breakpoint at the next caller function.
> +         gdb_test "tbreak caller$c" "Breakpoint.*\[0-9\]*\\." "tbreak caller$c"
> +
>         # Continue to the next caller function.
>         gdb_test "continue" ".*/\\* caller$c \\*/" "run to caller$c"
> 
>         # Do each callee function.
>           for {set e 1} {$e <= $limit} {incr e} {
> !
> !             gdb_test "tbreak callee$e" "Breakpoint.*\[0-9\]*\\." \
> !                     "tbreak caller$e"
> !
> !           gdb_test "continue" ".*/\\* callee$e \\*/" "run to callee$e"
> 
>               # Do a forced return from the callee.
>             send_gdb "return 0\n"

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9



More information about the Gdb-patches mailing list