Re: How can I debug git source code interactively with debugger like gdb?

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

 



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



[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]

  Powered by Linux