简体   繁体   中英

C++ Crash Dumps on POSIX

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 stack 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM