From: Eli Zaretskii <eliz@gnu.org>
To: Lerele <lerele@champenstudios.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [Patch] Win32 gdbserver new interrupt support, and attach to process fix.
Date: Sat, 24 Feb 2007 14:07:00 -0000 [thread overview]
Message-ID: <uejofvedj.fsf@gnu.org> (raw)
In-Reply-To: <45E0376D.9010605@champenstudios.com> (message from Lerele on Sat, 24 Feb 2007 14:02:37 +0100)
> Date: Sat, 24 Feb 2007 14:02:37 +0100
> From: Lerele <lerele@champenstudios.com>
> CC: gdb-patches@sourceware.org
>
> >>+#ifdef USE_WIN32API
> >>+static int remote_desc=INVALID_SOCKET;
> >>+#else
> >>+static int remote_desc=-1;
> >>+#endif
> >>
> >>
> >
> >I don't like using OS-dependent #define's where a functionality-based
> >#define can do the job. How about
> >
> > +#ifndef INVALID_SOCKET
> > +#define INVALID_SOCKET -1
> > +#endif
> >
> >and then use INVALID_SOCKET everywhere?
> >
> >
> Isn't INVALID_SOCKET just an OS specific define?
It is defined on some systems, but not on others. However, it is
(IMO) cleaner to use the defined symbol than to use the name of the OS
or an OS-specific API, because if tomorrow some other supported
platform will define INVALID_SOCKET, the code I suggested will work
without any changes, while yours will require to add that other
platform's name to the #ifdef.
> >>@@ -574,7 +584,7 @@
> >>
> >> FreeLibrary (kernel32);
> >>
> >>- return res;
> >>+ return res? 0:-1;
> >>
> >>
> >
> >I don't understand the need for this change. Can you explain?
> >child_continue does not promise to return exactly 1 when it fails,
> >only non-zero.
> >
> >
> >
> >
>
> That should actually be the simple fix for attach to process (function
> win32_attach). Do you see that line in child_continue function? Strange.
> It should be the last line in win32_attach.
Sorry, you are right, I was looking at the wrong function.
next prev parent reply other threads:[~2007-02-24 14:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 23:52 Lerele
2007-02-24 12:07 ` Eli Zaretskii
2007-02-24 13:03 ` Lerele
2007-02-24 14:07 ` Eli Zaretskii [this message]
2007-02-24 15:23 ` Lerele
2007-02-24 19:10 ` Eli Zaretskii
2007-02-24 21:19 ` Pedro Alves
2007-02-24 21:44 ` Andreas Schwab
2007-02-24 23:35 ` Lerele
2007-02-25 0:15 ` Daniel Jacobowitz
2007-02-25 1:57 ` Pedro Alves
2007-02-25 22:46 ` Pedro Alves
2007-03-04 22:53 ` Lerele
2007-03-05 0:56 ` Pedro Alves
2007-03-05 1:21 ` Pedro Alves
2007-03-05 13:17 ` Lerele
2007-03-05 20:34 ` Lerele
2007-03-05 20:44 ` Pedro Alves
2007-03-06 0:04 ` Pedro Alves
2007-03-06 20:39 ` Pedro Alves
2007-03-06 22:18 ` Lerele
2007-03-06 23:22 ` Pedro Alves
2007-03-05 12:44 ` Daniel Jacobowitz
2007-03-05 20:30 ` Lerele
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=uejofvedj.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=lerele@champenstudios.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