Force gdb to read .gdbinit in current folder
The user initialization file contains commands that are executed upon the startup of GDB. It is located in your home directory under the path:
Create/edit this file and add the following line to this file:
set auto-load safe-path /
This allows our programs to use a current directory initialization file, i.e. you can create a .gdbinit for each project you’re debugging.