This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]