This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: Elena Zannoni <ezannoni at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 24 Feb 2003 22:46:47 +0100
- Subject: Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
- References: <3E5A8C4F.7020000@nerim.fr> <15962.37096.719113.658720@localhost.redhat.com>
Hi Elena,
Elena Zannoni wrote:
Stephane Carrez writes:
> Hi!
>
> In the gdb.base/break.c test, the function marker4() is defined at line 46 when
> the test is compiled with -DPROTOTYPES and at line 51 otherwise. The break.exp
> test only check for line 51.
>
> This patch adds the missing regexp for marker4 at line 46.
> (tested with make check for m6811-elf; break.exp passes completely)
>
> Can you approve it?
>
Could this be fixed by adding a comment to the lines in question,
use gdb_get_line_number, and use that in the test?
It's not good because marker4() is defined at 2 different lines.
If we use gdb_get_line_number() it will always find the first match which is at 46
and the test will fail for targets that don't compile their tests with -DPROTOTYPES.
Stephane