[PATCH] D46578: Fix gdb pretty printers to work with Python 3.

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 05:22:55 PDT 2018


philip.pfaffe created this revision.
philip.pfaffe added a reviewer: dblaikie.
Herald added a subscriber: bollu.

Reiterate https://reviews.llvm.org/D23202 for container printers added after the change landed.


Repository:
  rL LLVM

https://reviews.llvm.org/D46578

Files:
  utils/gdb-scripts/prettyprinters.py


Index: utils/gdb-scripts/prettyprinters.py
===================================================================
--- utils/gdb-scripts/prettyprinters.py
+++ utils/gdb-scripts/prettyprinters.py
@@ -123,6 +123,8 @@
       self.done = True
       return ('value', self.member.dereference())
 
+    __next__ = next
+
   def children(self):
     if not self.value['hasVal']:
       return self._iterator('', True)
@@ -178,6 +180,8 @@
         self.first = False
       return 'x', v
 
+    __next__ = next
+
   def __init__(self, val):
     self.val = val
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46578.145671.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180508/9be0f568/attachment.bin>


More information about the llvm-commits mailing list