Closed Bug 911771 Opened 6 years ago Closed 6 years ago

Unable to start Firefox under gdb on Mac

Categories

(Toolkit :: Crash Reporting, defect, blocker)

x86
macOS
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

STEPS TO REPRODUCE:

  % gdb --args /path/to/firefox
  (gdb) run

EXPECTED RESULTS: Browser starts

ACTUAL RESULTS: "Program exited with code 06." and the crash reporter comes up.

ADDITIONAL INFORMATION:  This is a regression from bug 717538.  I did some poking around and it looks like when we're compiling toolkit/crashreporter/nsExceptionHandler.cpp on Mac the MOZ_DEBUG macro is _not_ defined.  Or at least we're taking the "opt build" branch of the #if/#else there.  If I use DEBUG instead of MOZ_DEBUG, things seem to work fine.

Some of the reports from the crash reporter when it comes up: 
https://crash-stats.mozilla.com/report/index/b07dcd6c-798a-496c-aa5b-eb8c62130902
https://crash-stats.mozilla.com/report/index/87a3a39d-bcdc-40fd-b804-e63b42130902
https://crash-stats.mozilla.com/report/index/2d82586f-8fae-4e49-b7c0-138862130902

They all seem to look the same.

Is it supposed to be possible to start with crashreporter under gdb, by the way, or should my gdbinit just be using MOZ_CRASHREPORTER_DISABLE=1?
Flags: needinfo?(mh+mozilla)
Is MOZ_DEBUG ever defined in .cpp files, by the way?  I only see one other .cpp usage... the rest are makefiles.
Putting "set env MOZ_CRASHREPORTER_DISABLE 1" in .gdbinit does not seem to help, for what it's worth, which is a bit surprising to me.
r+ for changing MOZ_DEBUG to DEBUG.
Flags: needinfo?(mh+mozilla)
Flags: in-testsuite-
Target Milestone: --- → mozilla26
Looks like the code that was removed in the bustage-fix was added by Henri in bug 18333.

CC'ing him, so that in the unlikely event that this code matters, he can jump in and vouch for keeping it (in a fixed-to-actually-run #ifdef chunk).
(And for the record, it looks like that #ifdeffed chunk became non-compilable by this cset, which removed the declaration of "delay":
  https://hg.mozilla.org/integration/mozilla-inbound/rev/6857ec16567d
)
https://hg.mozilla.org/mozilla-central/rev/8790cc20505b
https://hg.mozilla.org/mozilla-central/rev/746266548b65
Assignee: nobody → bzbarsky
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
(In reply to Daniel Holbert [:dholbert] from comment #5)
> Looks like the code that was removed in the bustage-fix was added by Henri
> in bug 18333.

Looking at the code, I think it's more likely that I just moved it from  the HTML content sink. Anyway, as far as I'm concerned, it's okay to remove that code.
Is this fully solved?  I can run Firefox under gdb with "gdb objdir/dist/NightlyDebug.app/Contents/MacOS/firefox" or "gdb objdir/dist/NightlyDebug.app/Contents/MacOS/firefox-bin" but running "./mach reftest --debugger=gdb" still fails with the "Program exited with code 06" message.
That's probably covered by bug 913173.
I suspect so, yes.  I'll follow up in that bug.
You need to log in before you can comment on or make changes to this bug.