From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16515 invoked by alias); 30 Mar 2011 04:12:04 -0000 Received: (qmail 15970 invoked by uid 22791); 30 Mar 2011 04:12:02 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Mar 2011 04:11:58 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LIU00E00RL0V000@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 30 Mar 2011 06:11:52 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.47.180]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LIU00EIKRNPTV20@a-mtaout21.012.net.il>; Wed, 30 Mar 2011 06:11:51 +0200 (IST) Date: Wed, 30 Mar 2011 09:25:00 -0000 From: Eli Zaretskii Subject: Re: [RFC] Missing sleep function for mingw hosts In-reply-to: To: Matt Rice Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, pierre.muller@ics-cnrs.unistra.fr Reply-to: Eli Zaretskii Message-id: <83wrjhqmbe.fsf@gnu.org> References: <004701cbede4$0ee18c20$2ca4a460$%muller@ics-cnrs.unistra.fr> <003001cbee11$49bb0880$dd311980$%muller@ics-cnrs.unistra.fr> <201103291523.46954.pedro@codesourcery.com> <831v1psnl9.fsf@gnu.org> <83y63xr3b0.fsf@gnu.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01191.txt.bz2 > Date: Tue, 29 Mar 2011 17:06:34 -0700 > From: Matt Rice > Cc: pedro@codesourcery.com, gdb-patches@sourceware.org, > pierre.muller@ics-cnrs.unistra.fr > > On Tue, Mar 29, 2011 at 3:04 PM, Eli Zaretskii wrote: > > > > > Aha, and all that for a function whose definition, including empty > > lines and comments, is 14 lines (10 lines without that slack). > > Typical. > > > > except it allows one to remove those 14 lines from gdb proper, > and call the sleep with impunity. I don't see why removing a few lines from GDB is a virtue in itself that justifies such a sledgehammer. > we & others benefit from the portability problems which we & they encounter. > like if it works with values of 49 or 29 days on various platforms. What, you mean we need in GDB to have features that sleep for 29 days? > you forgot that gdb_usleep depends on gdb_select which has 2 implementations > of either 134 or 3 lines which gnulib also has a module for. > > so thats 147 lines of c code that could potentially be removed, > allowing gdb to focus on being a debugger > rather than a debugger with an ad-hoc portability layer. I wasn't comparing gdb_usleep with gnulib's sleep. I was comparing gnulib's sleep with what the solution of the problem at hand should be. The problem is the lack of a `sleep' function in the MinGW runtime. The solution to this problem is a trivial 5-liner. The gnulib ``solution'' to the same problem is a much larger module. (You conveniently dismissed some of what that would bring into a package that wants to use `sleep' on the ground that GDB already has that for other needs. But in judging the elegance of a solution, those other dependencies should not be forgotten.) Frankly, I'm amazed how people don't see the inelegance of these massive ``solutions''. Is that just because they conveniently allow us to forget about the problem we needed solve? Me, I like the libiberty style: get a problem solved in the most direct and efficient way that can exist. This is what engineering is all about, IMO. Anyway, this will be my last post on this issue, since (a) we obviously disagree, and (b) it is pointless to argue, as a solution is already available.