Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb@sourceware.cygnus.com
Cc: Mark Kettenis <kettenis@science.uva.nl>,
	Christopher Faylor <cgf@redhat.com>
Subject: [RFC/RFA] fix  cygwin GDB "long long" return value error
Date: Fri, 05 Oct 2001 03:12:00 -0000	[thread overview]
Message-ID: <4.2.0.58.20011005095752.00d0db60@ics.u-strasbg.fr> (raw)
In-Reply-To: <s3ipu836x6i.fsf@soliton.wins.uva.nl>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2587 bytes --]

  This RFC/RFA is the followup of the thread about
that I started with the folliwng subject:

  [RFC] cygwin GDB "long long" return value error

At 21:07 04/10/01 , Mark Kettenis a écrit:
>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.

Yes, but I tried to change tm-i386v.h into tm-i386.h
it comiples OK and fixes trhe long klong errors that I reported first;
but I have no idea if it does make other good or bad changes.
It is probably necessary to run the testsuite before and after applying 
this patch, but
I can't do that on my machine.

ChangeLog:

2001-10-05 Pierre Muller <muller@ics.u-strasbg.fr>

         * config/i386/tm-cygwin.h: include tm-i386.h instead of tm-i386v.h.
              This fixes errors in "long long" handling for 'finish' and 
'return' commands.

Index: config/i386/tm-cygwin.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/tm-cygwin.h,v
retrieving revision 1.8
diff -r1.8 tm-cygwin.h
26c26
< #include "i386/tm-i386v.h"
---
 > #include "i386/tm-i386.h"

> >   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) :-).

   Yes, I saw it now and it does indeed work OK for go32v2 target.
(My latest go32v2 build was older ..)

Could someone, (Christopher ?) explains us why
tm-cygwin.h includes tm-i386v.h when as Mark Kettenis said,
Cygwin is not derived from System V ?



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99


  reply	other threads:[~2001-10-05  3:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pierre>
     [not found] ` <Muller's>
     [not found]   ` <message>
     [not found]     ` <of>
     [not found]       ` <Thu,>
     [not found]         ` <04>
     [not found]           ` <Oct>
     [not found]             ` <2001>
     [not found]               ` <01:24:30>
     [not found]                 ` <+0200>
2001-10-03 16:17                   ` [RFC] " Pierre Muller
2001-10-04 12:08                     ` Mark Kettenis
2001-10-05  3:12                       ` Pierre Muller [this message]
2001-10-10 19:09                         ` [RFC/RFA] fix " Christopher Faylor
2001-10-10 19:50                           ` Stan Shebs
2001-10-11 21:33                           ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.2.0.58.20011005095752.00d0db60@ics.u-strasbg.fr \
    --to=muller@cerbere.u-strasbg.fr \
    --cc=cgf@redhat.com \
    --cc=gdb@sourceware.cygnus.com \
    --cc=kettenis@science.uva.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox