I would like to set multiple breakpoints at once in different files in GDB.
Is it possible to have a script or any other way which I can run once I enter GDB debugger and have all the breakpoints set instead of setting them one by one using traditional set break
command.
All the resources I searched pointed to how to set breakpoints effectively. But, nothing seems to address my concern.
You can use the source command in gdb.
You can also put the commands in the .gdbinit file which will be sourced when you start gdb. Put the commands there and they will be run without doing anything more.
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