By default, gdb reads and executes the canned sequences of commands from init file (if any) in the current working directory, see Init File in the Current Directory during Startup.
Note that loading of this local .gdbinit file also requires accordingly
configured auto-load safe-path
(see Auto-loading safe path).
set auto-load local-gdbinit [on|off]
show auto-load local-gdbinit
info auto-load local-gdbinit