Closed Bug 430718 Opened 12 years ago Closed 12 years ago
Better objc exception logging with stack traces in debug builds
I was trying to track down an objc exception the other day and was frustrated by the fact that we don't know where the exceptions we're catching actually come from. The attached patch pulls the stack information out of the exception itself and converts it to symbolic form using apple's atos tool. It even gets system calls in the trace! It's all DEBUG-only at the moment because you have to have the atos tool installed (although it fails gracefully if you don't) and that comes in the Developer Tools package.
Josh pointed out that NSUInteger won't work on 10.4, so say hello to unsigned int!
10.4 also uses a different header (grr!) and doesn't have callStackReturnAddresses, so here's a version that should work properly on 10.4. Thanks, Josh, for testing on 10.4!
Apparently 10.4 warns for that selector while compiling even though it's runtime-safe... Here's a version that avoids the compiler warning.
Fixed comments and removed some braces.
12 years ago
Attachment #317611 - Flags: superreview?(roc)
Attachment #317611 - Flags: superreview?(roc) → superreview+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.