This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] testsuite/gdb.c++/overload.exp: work around "marker() ()" bug
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: [RFA] testsuite/gdb.c++/overload.exp: work around "marker() ()" bug
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Mon, 23 Apr 2001 09:06:07 -0400
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat Canada
- References: <200104230416.VAA18242@bosch.cygnus.com>
Sure. That is the way it should be done.
Thanks for the patch.
Fernando
Michael Elizabeth Chastain wrote:
>
> This is Sunday Project Patch #8.
>
> This patch changes testsuite/gdb.c++/overload.exp to use the library
> function 'runto' to reach a marker function. This simplifies the file,
> and it accommodates a bug in gdb when using g++ v3pre.
>
> The bug is PR gdb/34, "g++ v3 functions show as "inheritance2() ()"".
> testsuite/gdb.c++/method.exp has one specific test case to detect this
> bug, so I want to fix other test scripts so that they don't cascade
> fail on this bug.
>
> Before and after results with g++ v3pre:
> before: 3 PASS, 6 FAIL, 0 XPASS, 23 XFAIL
> after: 8 PASS, 1 FAIL, 19 XPASS, 4 XFAIL
>
> I tested this on native Red Hat Linux 7 and native Solaris 2.6 with
> gcc 2.95.3 and gcc 3pre dated 2001-04-22.
>
> OK to apply?
>
> Michael
>
> ===
>
> 2001-04-22 Michael Chastain <chastain@redhat.com>
>
> * gdb.c++/overload.exp: Use the 'runto' library function.
>
> ===
>
> Index: gdb/testsuite/gdb.c++/overload.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/overload.exp,v
> retrieving revision 1.4
> diff -c -3 -p -r1.4 overload.exp
> *** gdb/testsuite/gdb.c++/overload.exp 2001/03/06 08:21:54 1.4
> --- gdb/testsuite/gdb.c++/overload.exp 2001/04/23 03:04:41
> ***************
> *** 1,4 ****
> ! # Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> --- 1,4 ----
> ! # Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> *************** if ![runto_main] then {
> *** 61,86 ****
> continue
> }
>
> ! send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $"
> !
> ! send_gdb "cont\n"
> ! gdb_expect {
> ! -re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
> ! send_gdb "up\n"
> ! gdb_expect {
> ! -re ".*main.*$gdb_prompt $" {
> ! pass "up from marker1"
> ! }
> ! -re ".*$gdb_prompt $" {
> ! fail "up from marker1"
> ! }
> ! timeout { fail "up from marker1 (timeout)" }
> ! }
> ! }
> ! -re "$gdb_prompt $" { fail "continue to marker1" }
> ! timeout { fail "(timeout) continue to marker1" }
> ! }
>
>
> send_gdb "print foo_instance1\n"
> gdb_expect {
> --- 61,72 ----
> continue
> }
>
> ! if ![runto 'marker1'] then {
> ! perror "couldn't run to marker1"
> ! continue
> ! }
>
> + gdb_test "up" ".*main.*" "up from marker1"
>
> send_gdb "print foo_instance1\n"
> gdb_expect {
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9