g++ 的自动测试器/调试器?
我刚刚完成了密码学课程的一个项目,一切似乎都很顺利(大部分)。因为密钥是随机生成的,所以我想确保它适用于所有密钥。不管怎样,我运行了很多次,并在第 30 次运行时遇到了段错误。我无法在 gdb 中重现此段错误。 gdb 是否有命令,或者是否有其他方法可以继续运行程序,然后在出现段错误时中断,以便我可以检查堆栈?
I just finished a project for my cryptography class and it all seems to go well (mostly). Because the key is generated randomly, I wanted to ensure it would work for all keys. Anyway, I ran it a bunch of times and hit a segfault at around the 30th run. I haven't been able to reproduce this segfault in gdb. Does gdb have a command, or is there some other method to continue running the program and then break when it segfaults so I can check the stack?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将循环放入程序中,这样您只需在调试器中运行一次。
Place the loop inside your program so you only have to run it in the debugger once.