Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: kaih@khms.westfalen.de (Kai Henningsen)
To: gdb-patches@sources.redhat.com
Subject: Re: PATCH: Windows sockets
Date: Sun, 27 Mar 2005 12:59:00 -0000	[thread overview]
Message-ID: <9Tev9v9Xw-B@khms.westfalen.de> (raw)
In-Reply-To: <42459E07.9020201@codesourcery.com>

mark@codesourcery.com (Mark Mitchell)  wrote on 26.03.05 in <42459E07.9020201@codesourcery.com>:

> >    6. Tweak safe_strerror to deal with Windows sockets error codes.
> >
> > I'm defenitely not thrilled by this tweak.  You're only changing
> > "undocumented" into "winsock".  I presume it helps with debugging this
> > stuff, but is it really worth the clutter it adds?
>
> I think so, yes.  Windows strerror never returns NULL.  For unknown
> values, it returns "Unknown error" with no indication of *which* unknown
> error.  These errors are presented to users, so, if for example, a
> socket cannot be connected because the user entered the wrong port, or
> gdbserver is not running, the user would only see "Unknown error".  I
> agree that, from a user-experience point of view, "winsock error 12345"
> is not all that helpful -- but at least there is *some* method for
> figuring out what went wrong.

Well ...

There *is* support in Win32 for getting error message text for OS error  
numbers (which are completely different from errno numbers). There's a  
slight complication in that until lately, these didn't cover Winsock  
codes, but on modern Windows versions they do.

So it might make sense to try that.

See <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ 
debug/base/retrieving_the_last_error_code.asp> for example code.

MfG Kai


      parent reply	other threads:[~2005-03-27 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-26  1:27 Mark Mitchell
2005-03-26  2:09 ` Christopher Faylor
2005-03-26  8:47 ` Mark Kettenis
2005-03-26 17:38   ` Mark Mitchell
2005-03-26 17:48     ` Christopher Faylor
2005-03-26 19:06       ` Mark Mitchell
2005-03-26 21:03         ` Christopher Faylor
2005-03-26 22:00         ` Eli Zaretskii
2005-03-27 12:59     ` Kai Henningsen [this message]

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=9Tev9v9Xw-B@khms.westfalen.de \
    --to=kaih@khms.westfalen.de \
    --cc=gdb-patches@sources.redhat.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