Closed Bug 430718 Opened 16 years ago Closed 16 years ago

Better objc exception logging with stack traces in debug builds

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

Details

Attachments

(1 file, 4 obsolete files)

Attached patch Patch, v1 (obsolete) — Splinter Review
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.
Attachment #317586 - Flags: review?(joshmoz)
Attached patch Patch, v2 (obsolete) — Splinter Review
Josh pointed out that NSUInteger won't work on 10.4, so say hello to unsigned int!
Attachment #317586 - Attachment is obsolete: true
Attachment #317590 - Flags: review?(joshmoz)
Attachment #317586 - Flags: review?(joshmoz)
Attached patch Patch, v3 (obsolete) — Splinter Review
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!
Attachment #317590 - Attachment is obsolete: true
Attachment #317600 - Flags: review?(joshmoz)
Attachment #317590 - Flags: review?(joshmoz)
Attached patch Patch, v4 (obsolete) — Splinter Review
Apparently 10.4 warns for that selector while compiling even though it's runtime-safe... Here's a version that avoids the compiler warning.
Attachment #317600 - Attachment is obsolete: true
Attachment #317602 - Flags: review?(joshmoz)
Attachment #317600 - Flags: review?(joshmoz)
Attached patch Final patchSplinter Review
Fixed comments and removed some braces.
Attachment #317602 - Attachment is obsolete: true
Attachment #317611 - Flags: review?(joshmoz)
Attachment #317602 - Flags: review?(joshmoz)
Attachment #317611 - Flags: review?(joshmoz) → review+
Attachment #317611 - Flags: superreview?(roc)
Attachment #317611 - Flags: superreview?(roc) → superreview+
Checked in.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: