How to have gdb exit if program succeeds, break if program crashes?

前端 未结 7 1998
挽巷
挽巷 2020-12-10 02:23

I seem to have some kind of multithreading bug in my code that makes it crash once every 30 runs of its test suite. The test suite is non-interactive. I want to run my test

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 02:27

    Are you not getting a core file when it crashes? Start gdb like this 'gdb -c core' and do a stack traceback.

    More likely you will want to be using Valgrind.

提交回复
热议问题