coelhudo coelhudo - 14 days ago 10
C Question

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.

Answer

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