Closed Bug 1129798 Opened 9 years ago Closed 9 years ago

mach command debugging improvements

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(firefox38 fixed)

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

Patches forthcoming.
The previous debugger was setting a breakpoint in the mach dispatcher.
This required users to step into the main function to be called into.
Using pdb.runcall(), the debugger starts at the first line in the
executed command, which is far more useful.
Attachment #8559624 - Flags: review?(ahalberstadt)
I initially thought I'd have multiple patches here. I wanted to use pdb.post_mortem() to automatically enter a debugger from the raise point. However, combining pdb.post_mortem() with pdb.runcall() doesn't seem to work well. When the post mortem debugger is entered, it shows the frame as the first function in the dispatched mach command. I suspect that the debugger instance sets some state and pdb.post_mortem() isn't clearing it. Most weird.
So the traceback from sys.exc_info() doesn't have the correct frame info when pdb.runcall() is used. Digging through the source of pdb.py and bdb.py, I suspect extreme Python magic. I think a patch could be written, but it would involve calling a bunch of low-level pdb APIs. I'm not going to bother.
Attachment #8559624 - Flags: review?(ahalberstadt) → review+
https://hg.mozilla.org/mozilla-central/rev/71972672e292
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: