Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 gdb 作为类的一部分来解决二进制炸弹。每次我们引爆炸弹,我们都会丢分。我已经在引爆炸弹的功能上设置了一个断点,但是已经不小心跨过它几次并引爆了炸弹。有没有办法让 gdb 在特定点退出而不仅仅是中断?
您可以将命令附加到断点。设置断点后,例如 #1,执行以下操作:
commands 1 quit end