Re: [PATCH 3/6] Facilitate debugging Git executables in tests with gdb
- From
Jeff King <peff@peff.net>
- Date
- Oct 27, 2015, 23:28 UTC
- Message-ID
- <20151027232848.GA4172@sigill.intra.peff.net>
- In-Reply-To
- <xmqqr3kge0d3.fsf@gitster.mtv.corp.google.com>
On Tue, Oct 27, 2015 at 09:34:48AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Yeah, that was my first reaction when I saw this patch. Instead of > having to munge that line to "gdb -whatever-args git", you can do a > single-shot debugging in a convenient way. And quite honestly, > because nobody sane will run: > > $ cd t && TEST_GDB_GIT=1 sh ./t1234-frotz.sh > > and can drive all the "git" running under gdb at the same time, I > think what you showed would be the _only_ practical use case.
I agree doing so would be crazy. But would:
./t1234-frotz.sh --gdb=17
be sane to run gdb only inside test 17?
I suspect it would work about half the time. Many tests will call git only once per snippet, but many make multiple git calls, and we are only interested in debugging one.
I dunno. Maybe that is making things more complicated than they need to be. I usually use the "tweak the test script" approach, but I have always found it annoying to have to untweak it later.
-Peff