Add a GDB pretty-printer for mozilla::EnumSet

RESOLVED FIXED in Firefox 64

Status

enhancement
RESOLVED FIXED
8 months ago
8 months ago

People

(Reporter: botond, Assigned: botond)

Tracking

Trunk
mozilla64

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

8 months ago
After we transitioned the bitfield-style enum CompositorHitTestInfo to use mozilla::EnumSet in bug 1420996, it has come to my attention that EnumSet isn't very easy to work with in a debugger, in that determining the set of individual enumerator values that contribute to an EnumSet value can be laborious.

To make this better, I wrote a GDB pretty-printer for EnumSet.

Example output for a CompositorHitTestInfo:

(gdb) p hitResult
$5 = mozilla::gfx::CompositorHitTestInfo = {mozilla::gfx::CompositorHitTestFlags::eVisibleToHitTest, mozilla::gfx::CompositorHitTestFlags::eScrollbar, 
  mozilla::gfx::CompositorHitTestFlags::eScrollbarThumb, mozilla::gfx::CompositorHitTestFlags::eScrollbarVertical}

Comment 2

8 months ago
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56b783db0fd3
Add a GDB pretty printer for mozilla::EnumSet. r=tromey

Comment 3

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/56b783db0fd3
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.