This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix PR win32/14685
- From: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- To: jojelino <jojelino at gmail dot com>, gdb-patches at sourceware dot org
- Date: Tue, 5 Feb 2013 13:10:39 -0500
- Subject: Re: [PATCH] Fix PR win32/14685
- References: <51097819.502@gmail.com>
On Thu, Jan 31, 2013 at 04:44:25AM +0900, jojelino wrote:
>This patch fixes pr14685 by
>Keeping current_event in windows-nat.c from being altered in
>handle_output_debug_string.
>And fixes SIGSEGV not mentioned in pr14685 caused by cygwin-specific
>context load/save rooted from
>http://sourceware.org/git/?p=gdb.git;a=commit;f=gdb/windows-nat.c;h=8094fa2e73f05bd42a7005fd005aeaa26ea20c26
>2013-01-31 Jin-woo Ye <jojelino@gmail.com>
>
> PR win32/14685
> * windows-nat.c (do_windows_fetch_inferior_registers): Don't let gdb set the thread context using saved context.
> * windows-nat.c (handle_output_debug_string): Don't try altering current_event.
If this is really the right fix for this problem then don't #if 0 it.
That's daft. Just remove the lines.
>diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
>index 7ef10f1..cd4bd7a 100644
>--- a/gdb/windows-nat.c
>+++ b/gdb/windows-nat.c
>@@ -426,7 +426,11 @@ do_windows_fetch_inferior_registers (struct regcache *regcache, int r)
>
> if (current_thread->reload_context)
> {
>-#ifdef __COPY_CONTEXT_SIZE
>+/*
>+ * PR win32/14685
>+ * Don't let gdb set the thread context using saved context.
>+ */
>+#if 0
> if (have_saved_context)
> {
> /* Lie about where the program actually is stopped since
>@@ -950,12 +954,19 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
> else if (strncmp (s, _CYGWIN_SIGNAL_STRING,
> sizeof (_CYGWIN_SIGNAL_STRING) - 1) != 0)
> {
>+ printf_unfiltered("DebugString: %s\n", s);
> #ifdef __CYGWIN__
> if (strncmp (s, "cYg", 3) != 0)
> #endif
> warning (("%s"), s);
> }
>-#ifdef __COPY_CONTEXT_SIZE
>+ retval = main_thread_id;
>+/*
>+ * PR win32/14685
>+ * Don't try altering current_event.
>+ * Unless there is appropriate patch, loading cygwin context is just pointless.
>+ */
>+#if 0
> else
> {
> /* Got a cygwin signal marker. A cygwin signal is followed by