This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] testsuite/gdb.base/break.exp
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: [RFA] testsuite/gdb.base/break.exp
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Fri, 08 Dec 2000 14:29:13 -0500
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat , Inc. - Toronto
- References: <200012080013.QAA27984@train2.cygnus.com>
Yes.
Thanks!
Fernando
Michael Elizabeth Chastain wrote:
>
> Here is version #4 of my break.exp patch. This is a resubmittal.
> It is identical to version #3 (2000-Nov-28).
>
> This patch fixes these test failures on i686-pc-linux-gnu (native):
>
> FAIL: gdb.base/break.exp: break main #1
> FAIL: gdb.base/break.exp: break main #2
> FAIL: gdb.base/break.exp: clear main
>
> The problem is that 'main' is the name of parameter at the point where
> the program-under-test is executing (in __libc_start_main, right after
> a 'finish' command).
>
> My solution is:
>
> (1) Use "marker3" rather than "main" for a function name to test
> (2) Move the test to a scope that we control, where "marker3" is used
> as a function name in in the program-under-test.
>
> OK to apply?
>
> Michael Elizabeth Chastain
> <mailto:chastain@redhat.com>
> "love without fear"
>
> ===
>
> 2000-11-28 Michael Chastain <chastain@redhat.com>
>
> * break.exp (test_clear_command): use a marker function
> rather than 'main' for the test function. Also move this
> test to an execution point where the marker function names are
> guaranteed to be bound to functions. (Executing tests after a
> 'finish' from main runs into name conflicts with local names
> in __libc_start_main).
>
> Index: gdb/testsuite/gdb.base/break.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/break.exp,v
> retrieving revision 1.6
> diff -c -3 -p -r1.6 break.exp
> *** gdb/testsuite/gdb.base/break.exp 2000/11/17 16:24:48 1.6
> --- gdb/testsuite/gdb.base/break.exp 2000/11/28 18:26:45
> *************** gdb_expect {
> *** 520,525 ****
> --- 520,534 ----
> timeout {fail "(timeout) clear current line has no breakpoint disallowed"}
> }
>
> + # Verify that we can set and clear multiple breakpoints.
> + #
> + # We don't test that it deletes the correct breakpoints. We do at
> + # least test that it deletes more than one breakpoint.
> + #
> + gdb_test "break marker3" "Breakpoint.*at.*" "break marker3 #1"
> + gdb_test "break marker3" "Breakpoint.*at.*" "break marker3 #2"
> + gdb_test "clear marker3" {Deleted breakpoints [0-9]+ [0-9]+.*}
> +
> # Verify that a breakpoint can be set via a convenience variable.
> #
> send_gdb "set \$foo=81\n"
> *************** if [istarget "hppa*-*-hpux*"] then {
> *** 706,720 ****
> #********
>
>
> - proc test_clear_command {} {
> - gdb_test "break main" "Breakpoint.*at.*" "break main #1"
> - gdb_test "break main" "Breakpoint.*at.*" "break main #2"
> -
> - # We don't test that it deletes the correct breakpoints. We do at
> - # least test that it deletes more than one breakpoint.
> - gdb_test "clear main" {Deleted breakpoints [0-9]+ [0-9]+.*}
> - }
> -
> #
> # Test "next" over recursive function call.
> #
> --- 715,720 ----
> *************** proc test_next_with_recursion {} {
> *** 802,808 ****
> gdb_stop_suppressing_tests;
> }
>
> - test_clear_command
> test_next_with_recursion
>
>
> --- 802,807 ----
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9