From: Brandon Williams <bmwill@google.com>
To: 小川恭史 <aiueogawa217@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: How can I debug git source code interactively with debugger like gdb?
Date: Wed, 18 Oct 2017 12:56:02 -0700 [thread overview]
Message-ID: <20171018195602.GB155019@google.com> (raw)
In-Reply-To: <CAC2JkrLR=RUN01AeYGd1YpOPMv=kArm9LWGtMvJ7DS5sz7c3nw@mail.gmail.com>
On 10/19, 小川恭史 wrote:
> I wanna learn how daily git command works when I run specific git command.
>
> I wanna know which function is actually called then, how variables
> changes its value, and how some object is stored into database.
>
> How can I debug git source code interactively with debugger like gdb?
I have had to do this in the past when trying to track down particularly
nasty bugs. If you build git from source (you may need to turn on
debugging info) you'll be able to find a script '/bin-wrappers/git'
which you can use by making sure the environment variable 'GIT_TEST_GDB'
is set. This will launch it under gdb. For example:
GIT_TEST_GDB=1 ./bin-wrappers/git status
--
Brandon Williams
next prev parent reply other threads:[~2017-10-18 19:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-18 19:42 How can I debug git source code interactively with debugger like gdb? 小川恭史
2017-10-18 19:56 ` Brandon Williams [this message]
2017-10-18 19:57 ` Stefan Beller
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=20171018195602.GB155019@google.com \
--to=bmwill@google.com \
--cc=aiueogawa217@gmail.com \
--cc=git@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).