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]

Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix


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


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