Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: Various Windows (mingw32) additions, mostly relating to select or serial ports
Date: Mon, 06 Feb 2006 23:17:00 -0000	[thread overview]
Message-ID: <20060206231725.GA32216@nevyn.them.org> (raw)
In-Reply-To: <200602062301.k16N1hdu008774@elgar.sibelius.xs4all.nl>

On Tue, Feb 07, 2006 at 12:01:43AM +0100, Mark Kettenis wrote:
> > Date: Mon, 6 Feb 2006 16:02:38 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > 
> > On Fri, Feb 03, 2006 at 05:05:29PM -0500, Daniel Jacobowitz wrote:
> > > Fixes, all for a mingw32-hosted GDB:
> > 
> > Here is a revised version, in which the Windows select magic does not
> > live in event-loop.c, and including the NEWS entry.  I haven't changed
> > the pipe polling code; thanks to Ian for his suggestions, but I'm
> > not sufficiently sure they're workable.
> > 
> > Are there any bits of this patch that strike you as too ugly or in the
> > wrong place?
> 
> Hmm, can't mingw_select() just be called select()?  That'd remove much
> of the ugliness.

No, it can't.  Two reasons.  One is the same reason I mentioned for
strerror: with __attribute__((dllimport)) in the headers, GCC will
generate a load from the import table at call sites, and overriding the
function won't work.  MinGW doesn't use this today, if compiling with
GCC, but from the bits in the header files, it looks like they either
did in the past or want to in the future.  And I think they do use the
equivalent when compiling with MSVC.  No, I haven't tried building
GDB with MSVC.

Another reason is that I don't want to intercept all calls to select.
First of all, because select() is a useful function on Windows (works
on sockets only, but does work there) and it would be a valid way
to implement mingw_select for sockets - I nearly did that.  And second
because we call select, the socket version, explicitly from ser-tcp.c
before the connection and associated serial device are completely set
up.

If I could get around #1, I would look into handling #2, but it seems
likely to be more confusing than helpful, to me.

It wouldn't get rid of too much of the ugliness either, I'm afraid :-(
For instance you'd still need gdb_select.h; if you want fd_set on
Windows, you need <windows.h> or <winsock2.h>.  No <sys/select.h> to be
found.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-02-06 23:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 22:05 Daniel Jacobowitz
2006-02-03 22:08 ` Daniel Jacobowitz
2006-02-04 12:43   ` Eli Zaretskii
2006-02-04 15:13     ` Daniel Jacobowitz
2006-02-04  6:28 ` Ian Lance Taylor
2006-02-04 10:30   ` Eli Zaretskii
2006-02-04 17:06     ` Ian Lance Taylor
2006-02-04 17:45       ` Eli Zaretskii
2006-02-04 15:00   ` Daniel Jacobowitz
2006-02-05  0:01     ` Ian Lance Taylor
2006-02-05 22:00       ` Daniel Jacobowitz
2006-02-06  3:27         ` Ian Lance Taylor
2006-02-06  4:03           ` Daniel Jacobowitz
2006-02-04 12:38 ` Eli Zaretskii
2006-02-04 15:11   ` Daniel Jacobowitz
2006-02-04 15:23     ` Eli Zaretskii
2006-02-04 15:30       ` Daniel Jacobowitz
2006-02-06 21:02 ` Daniel Jacobowitz
2006-02-06 23:02   ` Mark Kettenis
2006-02-06 23:17     ` Daniel Jacobowitz [this message]
2006-02-06 23:21     ` Christopher Faylor
2006-02-09 22:38     ` Daniel Jacobowitz
2006-02-10  7:53       ` Eli Zaretskii
2006-02-10 20:46       ` Mark Kettenis
2006-02-10 22:02         ` Daniel Jacobowitz
2006-02-07  4:41   ` Eli Zaretskii

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=20060206231725.GA32216@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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