Cross-platform crash handler

女生的网名这么多〃 提交于 2019-11-30 11:27:23

Well, it turns out that google-breakpad is pretty nice after all. It's not totally easy to set up, but it's OK for what I need.

I wrote a article about dumping the stack in C/C++ with Windows and Unix/Linux at DDJ some years ago. It does not use a coredump, but it writes stack frames into a log file, on internal errors, or when the OS determines a Application fault.

Maybe it helps you:

See http://www.ddj.com/architect/185300443

For compiled code, there are two good options - core dumps under UNIX variants and Dr. Watson crash logs/dumps under Windows. I know that this isn't a cross-platform solution, but when if you are only dealing with two platforms, then having two solutions isn't really that bad of a thing.

Of course, the solutions only capture a core image at the time of crash and not the state of the machine. I don't know of anything that will capture IO and CPU load at the time of an application crash. You might want to look into the Mozilla Crash Reporter which is, oddly enough, also known as "Breakpad"... coincidence?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!