This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] cygwin GDB "long long" return value error
- To: Pierre Muller <pierre at idefix dot wisa dot be>
- Subject: Re: [RFC] cygwin GDB "long long" return value error
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- Date: 04 Oct 2001 21:07:49 +0200
- Cc: gdb at sourceware dot cygnus dot com
- References: <3.0.6.32.20011004012430.010f56b0@idefix.wisa.be>
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