GDB printing for hash tables is broken

RESOLVED FIXED in Firefox 65

Status

()

defect
RESOLVED FIXED
10 months ago
6 months ago

People

(Reporter: jld, Assigned: froydnj)

Tracking

unspecified
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

I tried to print a value that contains an XPCOM hash table, and:

  mBlockers = nsTHashtable<nsUint64HashKey>Traceback (most recent call last):
  File "third_party/python/gdbpp/gdbpp/thashtable.py", line 109, in children
    capacity = 1 << (table['kHashBits'] - table['mHashShift'])
gdb.error: There is no member or method named kHashBits.

It looks like kHashBits was renamed in bug 1477626 (in the “introduce mozilla::HashNumber” patch).
(Assignee)

Comment 1

6 months ago
kHashBits was renamed to mozilla::kHashNumberBits, which seems awkward
to access from the pretty-printer.  So we compute its value from the
HashNumber type instead.
Attachment #9027539 - Flags: review?(ttromey)
(Assignee)

Updated

6 months ago
Assignee: nobody → nfroyd
Blocks: 1460674

Comment 2

6 months ago
Comment on attachment 9027539 [details] [diff] [review]
make nsTHashtable pretty-printer aware of naming changes

Review of attachment 9027539 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this.  This looks good to me.
Attachment #9027539 - Flags: review?(ttromey) → review+

Comment 3

6 months ago
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/73de720af49d
make nsTHashtable pretty-printer aware of naming changes; r=tromey

Comment 4

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/73de720af49d
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Would it be possible to write a test that would catch this kind of breakage?
You need to log in before you can comment on or make changes to this bug.