开发者

C++ Crash Dumps on POSIX

开发者 https://www.devze.com 2023-03-11 07:02 出处:网络
I have a big C++ code (server for some application). This application is big, and catch a crash per 2 months in average.

I have a big C++ code (server for some application). This application is big, and catch a crash per 2 months in average. And i can't simulate this crash to catch her with gdb.

Is exists some cool api to analyze memory on crash dump (stacktrace, local vars)?

What is best way to catch 开发者_StackOverflowstack corruption time?


Enable core dumping, wait for it to crash. Then load the core into gdb and debug as usual.

ulimit -c unlimited


There are several things you can do :
1. Unit test your code, and execute them using valgrind
2. enable core dumps (as Let_Me_Be said in his answer)

0

精彩评论

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