Bug 1277628 - handle js::GCPtr in gdb pretty-printers; r?sfink
This avoids an error when trying to deref a GCPtr; and also adds the tag
to the NotImplementedError to make it simpler to fix similar bugs in the
future.
MozReview-Commit-ID: 48JzqqDgNxe
--- a/js/src/gdb/mozilla/Root.py
+++ b/js/src/gdb/mozilla/Root.py
@@ -79,10 +79,12 @@ def deref(root):
if not tag:
raise TypeError("Can't dereference type with no structure tag: %s" % (root.type,))
elif tag.startswith('js::HeapPtr<'):
return root['value']
elif tag.startswith('JS::Rooted<'):
return root['ptr']
elif tag.startswith('JS::Handle<'):
return root['ptr']
+ elif tag.startswith('js::GCPtr<'):
+ return root['value']
else:
- raise NotImplementedError
+ raise NotImplementedError("Unrecognized tag: " + tag)