This is the mail archive of the gdb@sourceware.cygnus.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: Restructuring i386_extract_return_value


   Date: Fri, 10 Mar 2000 12:42:08 -0500 (EST)
   From: Eli Zaretskii <eliz@delorie.com>

Thanks for looking at these changes!

   > Comments are welcome!

   The changes seem okay, but I have one consideration:

   > 1. The majority of i386 targets in GCC return floating-point values by
   >    default on the FPU stack.  In fact the only exception is NeXT.
   >    There is a switch `-mno-fp-ret-in-387' to force GCC to return
   >    floating-point values in the ordinary CPU registers.  I don't think
   >    this can be determined from the debugging information.  Is it worth
   >    adding a i386 target specific option to enable people to debug
   >    this code?  Propably not.

   Is this switch so painful to support that it is justified to disable
   debugging such programs?

Adding the switch wouldn't be too difficult.  However, I'm hesitating
to add new target-specific switches.  I haven't really investigated
things, but blindly adding them might move us further away from
multi-arching the i386.

   In my experience, about 5 minutes after you release a product based on
   the assumption that this switch is not used enough to care about,
   somebody posts a bug report for a program which does use that
   switch...

I'm pretty confident that this isn't going to happen.  the
`-mno-fp-ret-in-i387' switch changes the ABI.  You'd have to compile
all your code (including libraries) with that switch in order to make
it work, and I really fail to see the benefits of doing that.  Anybody
who's clueless enough about that switch to fail to understand that it
might lead to undebuggable code will probably also fail to notice the
switch in GDB.

I don't think I'll add the switch unless someone specifically asks for
it.

Mark

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