문제

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