Question

I'd like to set a set of breakpoints for a certain project to be loaded up when gdb starts. Until now I've been using ~/.gdbinit to hold those breakpoints, however, they are quite tedious to manage when using gdb with another project. Is there a way I can create gdb configurations custom to each project?

Was it helpful?

Solution

You can load any script with -x switch. So, gdb -x projectconfig.gdb yourbinary.

Projectconfig.gdb would contain what you initially had in .gdb_init.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top