From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11097 invoked by alias); 27 Mar 2005 12:59:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11083 invoked from network); 27 Mar 2005 12:59:16 -0000 Received: from unknown (HELO colo.khms.westfalen.de) (213.239.196.208) by sourceware.org with SMTP; 27 Mar 2005 12:59:16 -0000 Received: from khms.vpn ([10.172.192.2]:39480 helo=khms.westfalen.de) by colo.khms.westfalen.de with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.44) id 1DFXLE-0006t0-M6 for gdb-patches@sources.redhat.com; Sun, 27 Mar 2005 14:58:10 +0200 Received: from root (helo=khms.westfalen.de) by khms.westfalen.de with local-bsmtp (Exim 4.44) id 1DFXLD-0002Ay-2u for gdb-patches@sources.redhat.com; Sun, 27 Mar 2005 14:58:07 +0200 Received: by khms.westfalen.de (CrossPoint v3.12d.kh15 R/C435); 27 Mar 2005 14:43:17 +0200 Date: Sun, 27 Mar 2005 12:59:00 -0000 From: kaih@khms.westfalen.de (Kai Henningsen) To: gdb-patches@sources.redhat.com Message-ID: <9Tev9v9Xw-B@khms.westfalen.de> In-Reply-To: <42459E07.9020201@codesourcery.com> Subject: Re: PATCH: Windows sockets MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Organisation? Me?! Are you kidding? References: <200503260127.j2Q1R59a022152@sethra.codesourcery.com> <200503260845.j2Q8jlLC019248@elgar.sibelius.xs4all.nl> <200503260845.j2Q8jlLC019248@elgar.sibelius.xs4all.nl> <42459E07.9020201@codesourcery.com> X-No-Junk-Mail: I do not want to get *any* junk mail. X-Fix-Your-Modem: +++ATS2=255&WO1 X-SW-Source: 2005-03/txt/msg00361.txt.bz2 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 for example code. MfG Kai