I am looking to set up the path for the source code when debugging with gdb. I chose to do that with a .gdbinit file.
Basically, it contains a command:
d
Nevermind, I found how to do it by using Python scripting.
My .gdbinit file is now:
.gdbinit
python import os gdb.execute('directory' + os.environ['SOURCES'] + '/package_name/src') end show directories