Bug 1277628 - handle js::GCPtr in gdb pretty-printers. r=sfink
authorTom Tromey <tom@tromey.com>
Thu, 02 Jun 2016 12:32:27 -0600
changeset 341560 f729fa97d3a7e69f7550f01ddbfa8da9256421d7
parent 341559 7e9f778585288a52dbd6333b77ed817df6c97177
child 341561 ac2aaa6bcb4a80476d8c19dd6482ac119779f8b9
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1277628
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
js/src/gdb/mozilla/Root.py
--- 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)