From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: Pierre Muller Cc: gdb@sourceware.cygnus.com Subject: Re: [RFC] cygwin GDB "long long" return value error Date: Thu, 04 Oct 2001 12:08:00 -0000 Message-id: References: <3.0.6.32.20011004012430.010f56b0@idefix.wisa.be> X-SW-Source: 2001-10/msg00054.html Pierre Muller 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