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: Jason Molenda <jmolenda at apple dot com>
- To: Stephane Carrez <stcarrez at nerim dot fr>
- Cc: Elena Zannoni <ezannoni at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Mon, 24 Feb 2003 15:33:08 -0800
- Subject: Re: [RFA]: Fix testsuite/gdb.base/break.exp when test compiled with -DPROTOTYPES
On Monday, February 24, 2003, at 01:46 PM, Stephane Carrez wrote:
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.
Another alternative is to grab the line number when the breakpoint is
set, and compare against that. It does mean that gdb could have the
line number woefully incorrect, but at least gdb has to be consistently
incorrect. e.g. something like
send_gdb "break marker4\n"
gdb_expect {
-re "Breakpoint.*at.* file .*$srcfile, line ($decimal).*" {
set marker4_lineno $expect_out(1,string)
}
[...]
}
Or drop the PROTOTYPES-is-undefined case altogether. I have no idea if
there are cross-compilers in use that don't support prototypes, though..
J