This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [PATCH]: Promote float args on i386 (attn Hurd, Cygwin, DJGPP...)
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Subject: Re: [PATCH]: Promote float args on i386 (attn Hurd, Cygwin, DJGPP...)
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Fri, 12 May 2000 08:07:08 -0700
- CC: cgf at cygnus dot com, gdb-patches at sourceware dot cygnus dot com, kettenis at gnu dot org, jtc at redback dot com, nsd at cygnus dot com
- Organization: Cygnus Solutions
- References: <200005120557.WAA05792@cleaver.cygnus.com> <200005121051.GAA14389@indy.delorie.com>
- Reply-To: msnyder at cygnus dot com
Eli Zaretskii wrote:
>
> > From: Michael Snyder <msnyder@cygnus.com>
> > Date: Thu, 11 May 2000 22:57:53 -0700 (PDT)
> >
> > From the evidence, it appears that i386-gcc passes floats on the
> > stack after promoting them to doubles. At least I've verified this
> > on Linux, Solaris and Unixware. This patch fixes five testsuite
> > failures by making GDB pass floats as doubles when it calls a
> > target function. I'd appreciate verification / approval from the
> > maintainers of other x86 platforms such as Hurd, DJGPP, Cygwin,
> > BSD etc.
>
> Could you please identify the tests in the test suite, or post a short
> test program and a GDB session script, that could be used to test this
> problem?
Sure.
make check RUNTESTFLAGS=callfuncs.exp
FAIL: gdb.base/callfuncs.exp: p t_float_values(3.14159,-2.3765)
FAIL: gdb.base/callfuncs.exp: p t_float_values(float_val1,float_val2)
FAIL: gdb.base/callfuncs.exp: p t_float_values(3.14159,float_val2)
FAIL: gdb.base/callfuncs.exp: p t_float_values(float_val1,-2.3765)
FAIL: gdb.base/callfuncs.exp: p t_float_values2(3.14159,float_val2)
The problem is that GDB passes the float values as floats,
while the callee expects them to be doubles.