All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Vicent Marti <tanoku@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Lift --stdout restriction for using reachability bitmap in pack-objects?
Date: Tue, 17 Feb 2015 05:42:29 -0500	[thread overview]
Message-ID: <20150217104228.GA26301@peff.net> (raw)
In-Reply-To: <CACsJy8C=MC2xVbkXE-RBcLtcn0yEX4iqBLjgOw+M0iK5n-Kyhw@mail.gmail.com>

On Tue, Feb 17, 2015 at 05:36:30PM +0700, Duy Nguyen wrote:

> On Tue, Feb 17, 2015 at 5:13 PM, Jeff King <peff@peff.net> wrote:
> > If the only reason is for gdb, then perhaps:
> >
> >   set args pack-objects --stdout </dev/null >/dev/null
> >
> > in gdb would help?
> 
> Right. I used "gdb --args command >/dev/null" instead. Stupid
> question. Sorry for the noise.

I've made the same mistake myself many times. I really wish gdb would
interact over /dev/tty by default. The perl debugger does this, and I
find it quite handy. But I've never managed to make gdb do it. Maybe
there is an option I've missed[1].

The downside of what approach, though, is that you cannot restart the
program reliably from within the debugger (it cannot know how to
re-set-up the descriptors). So you have to quit and restart, which loses
any breakpoints, etc.

-Peff

[1] Having written that, I'm not sure I ever tried a script that does
    something like:

      program=$1; shift
      exec 3<&0
      exec 4>&1
      gdb </dev/tty >/dev/tty -ex "set args <&3 >&4 gdb $*" "$program"

    I think that would work, but it does screw up quoting/whitespace in
    your arguments.

  reply	other threads:[~2015-02-17 10:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-17 10:07 Lift --stdout restriction for using reachability bitmap in pack-objects? Duy Nguyen
2015-02-17 10:13 ` Jeff King
2015-02-17 10:36   ` Duy Nguyen
2015-02-17 10:42     ` Jeff King [this message]
2015-02-19  0:09       ` Kyle J. McKay

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=20150217104228.GA26301@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=tanoku@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.