[RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
Stephane Carrez
stcarrez@nerim.fr
Mon Feb 24 21:46:00 GMT 2003
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
More information about the Gdb-patches
mailing list