开发者

Debugging intermittent problem in gdb

I would li开发者_StackOverflow中文版ke to run a program (that requires arguments) repetitively in gdb under linux. It takes about a minute to run and it fails once every 30 or so times through. Any ideas would be appreciated.


gdb --eval-command=run --args executable-file [inferior-arguments ...] where executable-file is your executable and [inferior-arguments ...] is the list of arguments it takes will run your program once under gdb.

Unfortunately, I don't see an easy way to get gdb to quit when the program exits successfully. You could use --batch, but that doesn't let you do interactive debugging. It will at least give you a backtrace though. And you could use a --command file to dump everything you care about in --batch mode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜