3 ms·
What you want are core dumps, they allow after-the-fact use of the debugger. Use ulimit to raise the core dump size limit above 0 (I just use unlimited) and yo
by forgottenpass 12y ago
What you want are core dumps, they allow after-the-fact use of the debugger. Use ulimit to raise the core dump size limit above 0 (I just use unlimited) and you'll get a core dump whenever the process faults. More specifically there are a handful of signals that cause a core file to be created, so you can also send the right kills to the process to get one on demand.
- zackmorris 12y agoHaha I just had to post this. When I went to read about core dumps in iOS: http://stackoverflow.com/questions/7353024/when-an-app-crashes-in-ios-does-it-create-a-core-dump-anywhere http://stackoverflow.com/questions/7353024/when-an-app-crash... I got a StackOverflow core dump, of sorts, similar to this: http://img215.imageshack.us/img215/2886/picturezb.png http://img215.imageshack.us/img215/2886/picturezb.png Currently I am using an uncaught exception handler based on this: http://www.cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html http://www.cocoawithlove.com/2010/05/handling-unhandled-exce... But unfortunately it doesn't give very descriptive stack traces, even with debugger symbols turned on in the project settings. I'm really looking for something that shows me a full view of the program's state just like if I was in the debugger. It may be possible to extrapolate from the core dump, but I’m having a hard time figuring it out. This post summarizes how to do it with gdb: http://stackoverflow.com/questions/5115613/core-dump-file-analysis/5115653#5115653 http://stackoverflow.com/questions/5115613/core-dump-file-an... But I’m thinking a huge opportunity has been lost here. This should be built into IDEs and especially for mobile apps, there should be a standard way of sending core dumps back to the developer when apps crash, especially for ad hoc builds during testing.
- js2 12y agoCrittercism, Bugsense, Crashlytics and HockeyApp are all commercial providers that capture applications crashes and upload them to their backend. A few of them have built their SDKs on the open-source PLCrashReporter. You can also look at KSCrash and Google Breakpad. KSCrash may be the most advanced. Google Breakpad captures the closest thing to a core dump (it gathers only the stack and registers though).