Closed Bug 820692 Opened 12 years ago Closed 12 years ago

JS GDB pretty-printers: ptr-to-JSOBject pretty-printer fails with latest GDB sources

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file)

When run against a GDB built from the current sources (as of this bug's posting), the pointer-to-JSObject pretty-printer fails trying to find the value of the DELEGATE bit:

Traceback (most recent call last):
  File "/home/jimb/moz/dbg/js/src/gdb/mozilla/prettyprinters.py", line 235, in lookup
    p = check_table(ptr_printers_by_tag, t2.tag)
  File "/home/jimb/moz/dbg/js/src/gdb/mozilla/prettyprinters.py", line 226, in check_table
    return f(value, cache)
  File "/home/jimb/moz/dbg/js/src/gdb/mozilla/JSObject.py", line 26, in __init__
    cache.mod_JSObject = JSObjectTypeCache(value, cache)
  File "/home/jimb/moz/dbg/js/src/gdb/mozilla/JSObject.py", line 14, in __init__
    self.flag_DELEGATE = baseshape_flags['js::BaseShape::DELEGATE'].bitpos
AttributeError: 'gdb.Field' object has no attribute 'bitpos'
It seems like recent GDBs actually give gdb.Field instances separate 'bitpos' and 'enumval' properties, depending on whether the field represents a structure member or an enum value. This appears to have been part of a change to make GDB not store enum values internally in the 'bitpos' member of 'struct field' objects (dfd32e4e, 2012-4-18).
This patch also includes a fix for a minor error-printing bug in run-tests.py.
Assignee: general → jimb
Status: NEW → ASSIGNED
Attachment #691635 - Flags: review?(sphink)
Attachment #691635 - Flags: review?(sphink) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/f4beffe262c5
Flags: in-testsuite+
Target Milestone: --- → mozilla20
https://hg.mozilla.org/mozilla-central/rev/f4beffe262c5
Status: ASSIGNED → RESOLVED
Closed: 12 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: