I always need to type:
handle SIGPIPE nostop noprint pass
Is there a way to make it permanent or to configure gdb to have it in its settings?
Create a file ~/.gdbinit containing:
handle SIGPIPE nostop noprint pass
the contents of this file are just standard gdb commands, and are executed each time gdb is started.
It is also possible to have project specific .gdbinit files. Imagine your project directory is: /home/user/my-project/
and this is where you start gdb from when debugging your project. First add this line to your ~/.gdbinit:
add-auto-load-safe-path /home/user/my-project/.gdbinit
Then create a file /home/user/my-project/.gdbinit
place any gdb commands that are specific to this project into this new .gdbinit
file and they will be executed every time you start gdb in the project directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With