其他分享
首页 > 其他分享> > gdb 如何跳过断点

gdb 如何跳过断点

作者:互联网

gdb 如何跳过断点?

方法一

(gdb) continue 50
(gdb) help continue
Continue program being debugged, after signal or breakpoint.
Usage: continue [N]
If proceeding from breakpoint, a number N may be used as an argument,
which means to set the ignore count of that breakpoint to N - 1 (so that
the breakpoint won't break until the Nth time it is reached).

If non-stop mode is enabled, continue only the current thread,
otherwise all the threads in the program are continued.  To 
continue all stopped threads in non-stop mode, use the -a option.
Specifying -a and an ignore count simultaneously is an error.

方法二

 (gdb) ignore 8 100   # 忽略 8 号断点,100 次
 (gdb) c              # 继续执行
 (gdb) info break 8   # 断下之后,查看命中次数,和设置的相同
 (gdb) help ignore
  Set ignore-count of breakpoint number N to COUNT.
  Usage is `ignore N COUNT'.

参考

官方文档

标签:count,断点,ignore,gdb,continue,breakpoint,跳过
来源: https://blog.csdn.net/c2682736/article/details/121362540