This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 5/5] windows-nat: Don't change current_event.dwThreadId in handle_output_debug_string()
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 22 Apr 2015 07:18:11 -0700
- Subject: Re: [PATCH 5/5] windows-nat: Don't change current_event.dwThreadId in handle_output_debug_string()
- Authentication-results: sourceware.org; auth=none
- References: <1429009382-21040-1-git-send-email-jon dot turney at dronecode dot org dot uk> <1429212209-20548-1-git-send-email-jon dot turney at dronecode dot org dot uk> <1429212209-20548-6-git-send-email-jon dot turney at dronecode dot org dot uk>
> Since a Cygwin signal may be reported by a different thread to the thread the
> signal is to be delivered to, use the signal target thread id by returning it,
> rather than re-writing the thread id in current_event.
>
> Altering current_event.dwThreadId() will cause ContinueDebugEvent() to be
> applied to the wrong thread and fail, leaving the actual thread which reported
> the debug event stuck in the suspended state.
>
> gdb/ChangeLog:
>
> 2015-04-16 Jon Turney <jon.turney@dronecode.org.uk>
>
> * windows-nat.c (handle_output_debug_string): Don't change
> current_event.dwThreadId.
> (get_windows_debug_event): Use thread_id, rather than relying on
> current_event.dwThreadId being changed.
I think this one makes better sense to me. So OK, with the same comments
as for patch 4/5: I'd like the revision history to be self-sufficient,
to allow anyone looking at this change years from now to be able to
understand what it was that this patch was trying to do. So can you
amend it so that it gives a more complete description of the problem,
making it less abstract? In particular, a copy of the GDB session would
show what the symptoms are, and a copy of the behavior afterwards would
help.
Thank you,
--
Joel