Open Bug 1029377 Opened 10 years ago Updated 2 years ago

Install SM pretty printers and catchpoints in debug sessions for browser builds

Categories

(Core :: JavaScript Engine, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: efaust, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

SM has really nice pretty printers for values, and a catchpoint handler for the annoying operations callback stuff that are installed by default when debugging the standalone shell build. It would be nice if that stuff was loaded for browser build debugging, in particular for debug sessions spawned from mach.
This acts as an example of a case where segfaulting is accepted and can be ignored, on x64 platforms.

Running |./mach debug +slowscript| will block on the segfault, but the user can actually just |continue| and everything will behave well afterwards.
Attached patch Patch for gdb signal handlers (obsolete) — Splinter Review
There was actually a big discussion about this in bug 933807. It seems that now we do have a .gdbinit in the main directory, that's autoloaded when launching the browser with ./mach debug. So this patch just copies what has been done for the js shell: disabling access errors (ACCERR) segfaults, which are the ones used by the JITs.

When running |./mach debug +slowscript| with this patch applied, segfaults are correctly ignored. There are so many that we still need to hit continue sometimes in gdb, but that's the best I could have so far :/

I kind of remember we actually don't want that because of another program that watches segfaults, probably the crash reporter, but I am unsure the crash report would look at the ACCERR segfaults.

Bug 986673 seems to sketch a better long-term fix, but I feel like this patch is better than the current solution (i.e. disabling slow scripts handlers by default).
Andrew, Luke, any opinions on this approach?
Attachment #8445132 - Flags: feedback?(luke)
Attachment #8445132 - Flags: feedback?(bugmail)
Comment on attachment 8445132 [details] [diff] [review]
Patch for gdb signal handlers

Silencing SEGV_ACCERR faults is a bit scary b/c I assume these can come up for other reasons.  bug 986673 sounds like a good route.
Attachment #8445132 - Flags: feedback?(luke)
Comment on attachment 8445132 [details] [diff] [review]
Patch for gdb signal handlers

Clearing feedback field, as bug 986673 is on its way.
Attachment #8445132 - Flags: feedback?(bugmail)
Attachment #8445132 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: