Search code examples
c++cgdbdebugging

How to save settings in gdb?


Does anyone know how to save gdb settings (like "set print pretty on" or "set print elements 0", both from here)? I don't want to set my configuration every time that I will use gdb :/

I searched in google and SO, but I found nothing.


Solution

  • Add any commands you want to auto run in the .gdbinit file in your home directory.