public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Implement target async for Windows
Date: Fri, 4 Nov 2022 14:28:26 +0000	[thread overview]
Message-ID: <02f9d01b-1a0c-a9be-6e0d-bf06ab02da74@dronecode.org.uk> (raw)
In-Reply-To: <20220803130822.735057-3-tromey@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

On 03/08/2022 14:08, Tom Tromey via Gdb-patches wrote:
> This implements target async for Windows.  The basic idea is to have
> the worker thread block in WaitForDebugEvent, then notify the event
> loop when an event is seen.  In a few situations, this blocking
> behavior is undesirable, so the functions passed to do_synchronously
> are changed to return a boolean indicating which behavior is needed.
> ---
>   gdb/windows-nat.c | 123 ++++++++++++++++++++++++++++++++++++++++------
>   1 file changed, 108 insertions(+), 15 deletions(-)
> 
> diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
> index 80cdedce7b9..9c277e9a93d 100644
> --- a/gdb/windows-nat.c
> +++ b/gdb/windows-nat.c
> @@ -34,6 +34,7 @@
>   #include <signal.h>
>   #include <sys/types.h>
>   #include <fcntl.h>
> +#include <winsock2.h>
>   #include <windows.h>
>   #include <imagehlp.h>
>   #ifdef __CYGWIN__
This breaks the build on Cygwin, as including both winsock2 and Cygwin's 
sys/select.h is a big no-no.

I'm going to suggest the attached to fix this, but from a quick reading 
of the patch, I just wonder if winsock2.h is actually needed at all, as 
I don't immediately see anything that leaps out as needing it...

[-- Attachment #2: 0001-Fix-Cygwin-build-after-d08bae3d.patch --]
[-- Type: text/plain, Size: 787 bytes --]

From c4d35aa363a8037746ae8bd17f7b59f3c581e69f Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Wed, 2 Nov 2022 14:32:55 +0000
Subject: [PATCH] Fix Cygwin build after d08bae3d

Commit d08bae3d ("Implement target async for Windows") unconditionally
includes winsock2.h.  Don't do this on Cygwin, since we don't want to
use Windows socket functions.
---
 gdb/windows-nat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index ab94de03bbf..7342c71d7db 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -34,7 +34,9 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <fcntl.h>
+#ifndef __CYGWIN__
 #include <winsock2.h>
+#endif
 #include <windows.h>
 #include <imagehlp.h>
 #ifdef __CYGWIN__
-- 
2.38.1


  reply	other threads:[~2022-11-04 14:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-03 13:08 [PATCH 0/2] " Tom Tromey
2022-08-03 13:08 ` [PATCH 1/2] Move some Windows operations to worker thread Tom Tromey
2022-08-03 13:33   ` Eli Zaretskii
2022-08-03 18:47     ` Tom Tromey
2022-08-03 19:16       ` Eli Zaretskii
2022-08-03 13:08 ` [PATCH 2/2] Implement target async for Windows Tom Tromey
2022-11-04 14:28   ` Jon Turney [this message]
2022-11-08 18:38     ` Tom Tromey
2022-11-13 14:45       ` Jon Turney
2022-11-04 14:59   ` Jon Turney
2022-11-08 18:52     ` Tom Tromey
2022-11-17 14:33       ` Jon Turney
2022-11-17 18:38         ` Tom Tromey
2022-11-17 18:43           ` Tom Tromey
2022-08-03 13:34 ` [PATCH 0/2] " Eli Zaretskii
2022-08-03 18:54   ` Tom Tromey
2022-08-03 19:17     ` Eli Zaretskii
2022-08-22 18:03 ` Tom Tromey

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=02f9d01b-1a0c-a9be-6e0d-bf06ab02da74@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).