mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 819525: JS GDB pretty-printers: Don't trip over tagless structs. DONTBUILD r=sfink
This commit is contained in:
parent
ee5da5b676
commit
c0928bdcb3
@ -53,7 +53,9 @@ class EncapsulatedValue(Common):
|
||||
# Return the referent of a HeapPtr, Rooted, or Handle.
|
||||
def deref(root):
|
||||
tag = root.type.strip_typedefs().tag
|
||||
if tag.startswith('js::HeapPtr<'):
|
||||
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']
|
||||
|
@ -231,7 +231,7 @@ def lookup_for_objfile(objfile):
|
||||
for t2 in implemented_types(t.target()):
|
||||
if t2.code == gdb.TYPE_CODE_TYPEDEF:
|
||||
p = check_table(ptr_printers_by_tag, str(t2))
|
||||
elif t2.code == gdb.TYPE_CODE_STRUCT:
|
||||
elif t2.code == gdb.TYPE_CODE_STRUCT and t2.tag:
|
||||
p = check_table(ptr_printers_by_tag, t2.tag)
|
||||
else:
|
||||
p = None
|
||||
@ -239,7 +239,7 @@ def lookup_for_objfile(objfile):
|
||||
else:
|
||||
if t.code == gdb.TYPE_CODE_TYPEDEF:
|
||||
p = check_table(printers_by_tag, str(t))
|
||||
elif t.code == gdb.TYPE_CODE_STRUCT:
|
||||
elif t.code == gdb.TYPE_CODE_STRUCT and t.tag:
|
||||
m = template_regexp.match(t.tag)
|
||||
if m:
|
||||
p = check_table(template_printers_by_tag, m.group(1))
|
||||
|
Loading…
Reference in New Issue
Block a user