Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top