From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [patch/cygwin] Remove dependency on __COPY_CONTEXT_SIZE
Date: Tue, 31 Mar 2015 12:34:00 -0000 [thread overview]
Message-ID: <551A9443.5010907@redhat.com> (raw)
In-Reply-To: <20150330100454.GA8372@calimero.vinschen.de>
On 03/30/2015 11:04 AM, Corinna Vinschen wrote:
> @@ -820,7 +819,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
> #endif
> warning (("%s"), s);
> }
> -#ifdef __COPY_CONTEXT_SIZE
> +#ifdef __CYGWIN__
> else
> {
> /* Got a cygwin signal marker. A cygwin signal is followed by
> @@ -847,8 +846,8 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
> else if ((x = (LPCVOID) (uintptr_t) strtoull (p, NULL, 0))
> && ReadProcessMemory (current_process_handle, x,
> &saved_context,
> - __COPY_CONTEXT_SIZE, &n)
> - && n == __COPY_CONTEXT_SIZE)
> + sizeof (CONTEXT), &n)
Is that really wise? AFAIK, the size of the CONTEXT structure can
grow as MSFT adds more registers to support newer machines.
It seems to me that the gdb and cygwin.dll builds can disagree
on the size of that structure. Seems to me that this mechanism should
have a way to let GDB know the size of the context structure. Or maybe
read just saved_context.ContextFlags first, and infer the size from
that, reading in the most we understand?
> + && n == sizeof (CONTEXT))
> have_saved_context = 1;
> current_event.dwThreadId = retval;
> }
>
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-03-31 12:34 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 [this message]
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
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=551A9443.5010907@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