Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Matt Rice <ratmice@gmail.com>
Cc: pedro@codesourcery.com, gdb-patches@sourceware.org,
	pierre.muller@ics-cnrs.unistra.fr
Subject: Re: [RFC] Missing sleep function for mingw hosts
Date: Wed, 30 Mar 2011 09:25:00 -0000	[thread overview]
Message-ID: <83wrjhqmbe.fsf@gnu.org> (raw)
In-Reply-To: <AANLkTi=jaLR5zhRq+pQkx2KwtyWEJqQXuWQTu_Jwur1b@mail.gmail.com>

> Date: Tue, 29 Mar 2011 17:06:34 -0700
> From: Matt Rice <ratmice@gmail.com>
> 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 <eliz@gnu.org> 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.


      reply	other threads:[~2011-03-30  4:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29  8:11 Pierre Muller
2011-03-29 13:10 ` Eli Zaretskii
2011-03-29 14:23   ` Pierre Muller
2011-03-29 15:40     ` Pedro Alves
2011-03-29 15:41       ` Kai Tietz
2011-03-29 15:43       ` [RFA] use gdb_usleep instead of sleep in remote-mips.c (was Missing sleep function for mingw hosts) Pierre Muller
2011-03-29 15:53         ` Joel Brobecker
2011-03-29 16:54           ` Pierre Muller
2011-03-29 22:05       ` [RFC] Missing sleep function for mingw hosts Eli Zaretskii
2011-03-30  0:06         ` Matt Rice
2011-03-30  4:12           ` Eli Zaretskii
2011-03-30  6:25             ` Matt Rice
2011-03-30  9:25               ` Eli Zaretskii [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=83wrjhqmbe.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=ratmice@gmail.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