This is the mail archive of the gdb@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: [RFC] cygwin GDB "long long" return value error


Pierre Muller <pierre@idefix.wisa.be> writes:

>   This macro has a correct implementation in config/i386/tm-i386.h
> where 64bit integers are taken from the edx:eax pair.

Nowadays it's a function in i386-tdep.c.

>   But config/i386/tm-i386v.h overwrites this macro
> by using memcpy on the register buffer, which then leads to
> using ecx:eax as return value.

Yep.  I don't know what the origional System V compiler did, but it's
unlikely that it did return 64-bit quantities in ecx:eax, if it
supported 64-bit quantities at all.  I have a patch that removes most
of the presumably unecessary junk from tm-i386v.h.  I might as well
post it.

>   As cygwin version relies on tm-i386v.h,
> the 64bit integers are wrong.

IMHO cygwin shouldn't include tm-i386v.h.  tm-i386.h already the
necessary stuff, and really does a better job at it.  Cygwin
defenitely isn't derived from System V.

>   Anyhow STORE_RETURN_VALUE in config/i386/tm-i386.h
> suffers from the same error, the "long long" value will be copied
> into ecx:eax instead of edx:eax

Fixed in the current sources (both mainline and the 5.1 branch) :-).

Thanks for the report anyway,

Mark


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