How to reload gdbinit?
c, debugging, gdb
Solution
You can execute the commands in .gdbinit (or any other file) with the `source` command. E.g., `source .gdbinit` will execute the commands in the `.gdbinit` in your current directory. You will need to specify the path if you want to use another `.gdbinit`, such as `source ~/.gdbinit` for the one in your home directory.
This will only execute the commands currently in the file; it will not reset or undo the commands that were previously in the file. So it will update any definitions or settings the current commands make, but it will not erase or undo any old definitions or settings.
Problem
Is there a way to reload .gdbinit file. Assume that you are already working in gdb, and you have made changes to .gdbinit, and want to reload the new .gdbinit without disturbing the present gdb environment. Is this possible?