This is the mail archive of the gdb-patches@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: [PATCH]: Promote float args on i386 (attn Hurd, Cygwin, DJGPP...)


Eli Zaretskii wrote:
> 
> > Date: Fri, 12 May 2000 08:07:08 -0700
> > From: Michael Snyder <msnyder@cygnus.com>
> >
> > 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)
> 
> Like Mark, I don't see these failures.  All of these tests pass for me
> with the DJGPP version.
> 
> > The problem is that GDB passes the float values as floats,
> > while the callee expects them to be doubles.
> 
> Hmm...  If I put a breakpoint at the beginning of value_push:
> 
>     static CORE_ADDR
>     value_push (sp, arg)
>          register CORE_ADDR sp;
>          value_ptr arg;
>     {
>       register int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
>       register int container_len = len;
>       register int offset;
> 
> and then run callfuncs and type "p t_float_values(float_val1,float_val2)",
> I see that `len' gets the value of 8.  So it seems like GDB already
> knows that these arguments need to be passed as doubles.
> 
> Is it possible that GDB passes the float values as doubles, at least
> on some platforms?  What value does `len' have on the Solaris and
> Unixware?

Four.

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