Some tips about debugging Git with GDB and LLDB.
By default, Git's Makefile compiles Git with debug symbols (-g
),
but with optimization level -O2
, which can lead to some variable being optimized out and thus making the executable harder to debug.
To compile with -O0
, you can tweak CFLAGS
using config.mak
:
$ cat config.mak