Closed Bug 1652232 Opened 5 years ago Closed 5 years ago

js-gdb.py is busted

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox78 --- unaffected
firefox79 --- wontfix
firefox80 --- wontfix
firefox84 --- wontfix
firefox85 --- wontfix
firefox86 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

js-gdb.py is missing imports and on top of that plain shell builds no longer load gdb files, because the gdbinit files are only copied in build/moz.build, which isn't called when doing a plain configure + make.

Set release status flags based on info from the regressing bug 1642121

For your information, if this does not work, this file can be source-d from its location in the source directory.

Severity: -- → S4
Priority: -- → P3

(In reply to Nicolas B. Pierron [:nbp] from comment #2)

For your information, if this does not work, this file can be source-d from its location in the source directory.

Sadly, the file you'd need to source was formerly autogenerated but now no longer is. If you have a stale copy lying around, it'll still work. (That's how I messed this up in the first place.) Temporarily, I manually enable them with

define empretty
  python import mozilla.autoload
  python mozilla.autoload.register(gdb.current_objfile())
end
define pretty
  python sys.path.insert(0, '/home/sfink/src/mozilla/js/src/gdb')
  empretty
end

(I actually have a whole set of pretty, pretty2, etc. aliases depending on which source tree I'm in; that's why empretty is split out.)

I have a fix over at bug 1655789, but if that doesn't get reviewed soon or is rejected, I plan on backing out bug 1642121 soon.

Bug 1655789 has landed, which fixes this when running under gdb. I'm still trying to work out what would be the best solution for rr. You can manually source ...objdir.../dist/bin/js-gdb.py and it will work again, at least.

If I fix the rr case, I'll do it in another bug. I believe the problem here is resolved now, but let me know if you disagree.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

I still get that error when I do ~/hg/mozilla-inbound/js/src/build-debug-obj$ gdb --args dist/bin/js:

Reading symbols from dist/bin/js...done.
Traceback (most recent call last):
  File "/home/andre/hg/mozilla-inbound/js/src/build-debug-obj/dist/bin/js-gdb.py", line 12, in <module>
    devel_objdir = abspath(os.path.join(dirname(__file__), '..', '..'))
NameError: name 'os' is not defined

js-gdb.py has only one import from os.path import abspath, dirname. It's still missing imports for os, re, and gdb.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → andrebargull
Pushed by malexandru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d2a95cfff74f Add missing import statements in js-gdb.py. r=sfink
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: