سؤال

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