This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Test for GCC debug symbol bug
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: law at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 4 Jan 2002 20:56:23 -0500
- Subject: Re: Test for GCC debug symbol bug
- References: <1754.1010182499@porcupine.cygnus.com>
On Fri, Jan 04, 2002 at 03:14:59PM -0700, law@redhat.com wrote:
>
> This patch adds a test for a GCC bug in its line number output.
>
> Basically if we have a multi-line IF or WHILE conditional, GCC will
> emit incorrect line numbers for the IF/WHILE statement.
>
> The incorrect line numbers (of course) make debugging multi-line
> IF/WHILE statements a PITA.
>
> To help ensure the GCC team doesn't break this again, I'd like to
> add this relatively simple test to the GDB testsuite.
>
>
> * gdb.base/break.c (multi_line_if_conditional): New function.
> (multi_ilne_while_conditional): Likewise.
> * gdb.base/break.exp: Verify that a breakpoint on a multi-line
> IF or WHILE condition puts the breakpoint at the start of
> the condition.
<Andrew Cagney Hat On, apologies to Andrew>
This is obvious; please do commit it. I'm all in favor of debug info
tests.
Of course, we may want to mark it XFAIL if we end up stopping where
broken GCC's would have; I really dislike FAILs that GDB can do nothing
about, although in some cases they're unavoidable. Do we have a
documented policy for what all the DejaGNU result codes mean in the GDB
testsuite? If not, should I propose one?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer