Content #
要让GDB每次到达同一个断点时都自动执行一组命令,该如何操作?
使用Breakpoint Command Lists
(gdb) command 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>silent
>printf "fibonacci was passed %d.\n", n
>continue
>end
From #
软件调试的艺术