forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Debugging Git
Johannes Schindelin edited this page Nov 9, 2015
·
16 revisions
First of all, Git's .exe
files should be rebuilt with debugging information, and without optimization (because gdb
has serious troubles single-stepping code compiled using -O2
for some reason). To this end, install the Git for Windows SDK, edit /usr/src/git/Makefile
to remove the -O2
from the CFLAGS = -g -O2 -Wall
line and then run make
in /usr/src/git/
.
After that, you can run Git's executables in GDB like so:
gdb --args ./git.exe --exec-path=/usr/src/git rev-parse HEAD
This wiki page has been retired. All it did was to point to Git for Windows' governance model.