Re: Lift --stdout restriction for using reachability bitmap in pack-objects?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]