public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom Tromey <tom@tromey.com>,
	Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 4/4] gnulib: import select
Date: Wed, 9 Jun 2021 13:27:25 +0100	[thread overview]
Message-ID: <46d0d024-1892-3584-3523-e8f5b2997630@palves.net> (raw)
In-Reply-To: <YL73hlygSbL+r7k5@vapier>

On 2021-06-08 5:52 a.m., Mike Frysinger via Gdb-patches wrote:
> On 07 Jun 2021 08:29, Tom Tromey wrote:
>>>>>>> "Mike" == Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org> writes:
>>
>> Mike> A few sims use this to emulate the syscall & provide network
>> Mike> functionality.
>>
>> Thank you, I think this is ok.
>>
>> There are some gnulib modules that don't work well for gdb.
>> The only one I can really remember is 'stat'.  Hopefully select isn't
>> one of them :)
> 
> that would be unfortunate, but i guess we'll find out.  i'm not sure how we
> can balance these tensions short of each project starting to carve out their
> own gnulib ports.

I think that on Windows, gnulib's select module does something very similar to 
what we do with ser-mingw.c's gdb_select:

~~~
/* On Windows, gdb_select is implemented using WaitForMulpleObjects.
   A "select thread" is created for each file descriptor.  These
   threads looks for activity on the corresponding descriptor, using
   whatever techniques are appropriate for the descriptor type.  When
   that activity occurs, the thread signals an appropriate event,
   which wakes up WaitForMultipleObjects.
~~~

I've always feared that gnulib's select module would conflict with that,
but I don't know for sure.  In theory, we should be able to replace all
that code by using gnulib's select instead, though I'm not sure gnulib
handles some particulars like Ctrl-C interruption.

I think we can avoid some pain of someone tests the import on Windows before
merging to master.

Thanks,
Pedro Alves

  parent reply	other threads:[~2021-06-09 12:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 17:25 [PATCH 1/4] gnulib: import chown Mike Frysinger
2021-05-29 17:25 ` [PATCH 2/4] sim: v850: assume chown is available Mike Frysinger
2021-05-29 17:25 ` [PATCH 3/4] gnulib: import netdb Mike Frysinger
2021-06-07 14:27   ` Tom Tromey
2021-05-29 17:25 ` [PATCH 4/4] gnulib: import select Mike Frysinger
2021-06-07 14:29   ` Tom Tromey
2021-06-08  4:52     ` Mike Frysinger
2021-06-08 12:37       ` Tom Tromey
2021-06-09 12:27       ` Pedro Alves [this message]
2021-06-09 16:52         ` Mike Frysinger
2021-06-09 18:12           ` Pedro Alves
2021-06-09 18:32             ` Mike Frysinger
2021-06-09 23:30               ` Pedro Alves
2021-06-10  0:38                 ` Mike Frysinger
2021-06-10 18:11                   ` Tom Tromey
2021-06-07 14:23 ` [PATCH 1/4] gnulib: import chown Tom Tromey
2021-06-07 14:31   ` Eli Zaretskii
2021-06-08  1:15     ` Mike Frysinger
2021-06-08  2:32       ` Eli Zaretskii
2021-06-08  4:14         ` Mike Frysinger

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=46d0d024-1892-3584-3523-e8f5b2997630@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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).