From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74262 invoked by alias); 1 Apr 2015 10:44:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 74178 invoked by uid 89); 1 Apr 2015 10:44:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 01 Apr 2015 10:44:50 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t31Aim7h026687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 1 Apr 2015 06:44:48 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t31AikBF012712 for ; Wed, 1 Apr 2015 06:44:47 -0400 Message-ID: <551BCC1E.90306@redhat.com> Date: Wed, 01 Apr 2015 10:44:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [patch/cygwin] Remove dependency on __COPY_CONTEXT_SIZE References: <20150330100454.GA8372@calimero.vinschen.de> <551A9443.5010907@redhat.com> <20150331143643.GA10846@calimero.vinschen.de> <551AB630.4010800@redhat.com> <20150331154215.GL13285@calimero.vinschen.de> <551ACB9E.2080902@redhat.com> <20150331183239.GA14520@calimero.vinschen.de> In-Reply-To: <20150331183239.GA14520@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00013.txt.bz2 On 03/31/2015 07:32 PM, Corinna Vinschen wrote: > On Mar 31 17:30, Pedro Alves wrote: >>>> That's not true. GetThreadContext takes a size parameter, >>>> and only writes to the bits that the caller requests with >>>> context.ContextFlags. >>> >>> The ContextFlags member is not a size parameter, >> >> I didn't say it was. The GetThreadContext function takes >> an IN+OUT size parameter in _addition to the ContextFlags flag. > > Uhm...no, it doesn't. The prototype is > > BOOL WINAPI GetThreadContext( > _In_ HANDLE hThread, > _Inout_ LPCONTEXT lpContext > ); Eh, somehow I got confused. Sorry about that. >> I'm almost sure in the old days, the CONTEXT structure didn't have >> the ExtendedRegisters field at all. > > I don't know about that. But the fact that CONTEXT is not a opaque > structure but exposed to user space speaks against that. Every time > a Win32 datatype needs a change, MSFT kept the old datatype intact > and added an "Ex" or "2" type instead, just as with the functions. OK. > >> I think it's bad to hard code >> the size of the CONTEXT structure, but won't argue further. Patch >> is OK if you'd really like to apply it as is. > > Thanks. But incidentally I retract the patch. It seems we made a > mistake both, on 32 and 64 bit Cygwin as far as the definition of > __COPY_CONTEXT_SIZE is concerned. Changing that to sizeof(CONTEXT) now > would potentially break backward compatibility with all Cygwin versions > up to today. Oh well. Not sure I understand what you mean, but OK. > Sorry for the longish discussion for nothing :( Sounds like it wasn't for nothing then. Thanks, Pedro Alves