Closed
Description
Servo recently switched to NonZero for its smart pointers. This means that our JS structs of the form
struct JSRef<T> {
ptr: *const T,
...
}
became
struct JSRef<T> {
ptr: NonZero<*const T>,
...
}
In the original system, print ref.ptr
in gdb
would nicely print a typed pointer (something like (struct foo::bar::Baz<Quux>)* 0x12345
IIRC). Now, it gives us simply {0x12345}
, and there doesn't seem to be a way to get the inner data out. This is quite annoying since we use these pointers everywhere in the DOM.
The larger issue here I guess is that anonymous fields can't be accessed as an expression in gdb
. Perhaps naming them .0
, .1
explicitly would work?