This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix
- To: chastain at cygnus dot com, shebs at apple dot com
- Subject: Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix
- From: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Date: Thu, 28 Jun 2001 13:02:48 -0700
- Cc: ac131313 at cygnus dot com, cagney at cygnus dot com, gdb-patches at sourceware dot cygnus dot com, kettenis at wins dot uva dot nl, msnyder at cygnus dot com
Ah, I have an example in the existing test suite.
gdb.base/funcargs.c has several functions with one-line bodies:
#ifdef PROTOTYPES
void call5a (struct stag st)
#else
call5a (st)
struct stag st;
#endif
{st.s1 = 5;}
In some configurations, this causes problems because gcc optimizes away
the stabn for the end of the prologue. gdb needs that stabn; without
that stabn, it ultimately comes up with a bogus place to breakpoint and
thus prints incorrect values of the "st" argument.
I've seen this happen on native i686-pc-cygwin and native i686-pc-linux
with a gcc v2 compiler. I haven't seen it happen with a gcc v3 compiler.
I haven't filed a bug report yet.
The bug depends on the fact that the whole function body is one line.
The Gnu Coding Standard prohibits this:
http://www.gnu.org/prep/standards_22.html#SEC22
MichaelC