From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch/cygwin] Remove dependency on __COPY_CONTEXT_SIZE
Date: Wed, 01 Apr 2015 10:44:00 -0000 [thread overview]
Message-ID: <551BCC1E.90306@redhat.com> (raw)
In-Reply-To: <20150331183239.GA14520@calimero.vinschen.de>
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
next prev parent reply other threads:[~2015-04-01 10:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 10:04 Corinna Vinschen
2015-03-31 12:34 ` Pedro Alves
2015-03-31 14:36 ` Corinna Vinschen
2015-03-31 14:59 ` Pedro Alves
2015-03-31 15:42 ` Corinna Vinschen
2015-03-31 16:30 ` Pedro Alves
2015-03-31 18:32 ` Corinna Vinschen
2015-04-01 10:44 ` Pedro Alves [this message]
2015-04-01 11:53 ` Corinna Vinschen
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=551BCC1E.90306@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/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