aboutsummaryrefslogtreecommitdiffhomepage
path: root/debug
diff options
context:
space:
mode:
authorGravatar Kolja Brix <brix@igpm.rwth-aachen.de>2014-04-28 14:10:22 +0100
committerGravatar Kolja Brix <brix@igpm.rwth-aachen.de>2014-04-28 14:10:22 +0100
commitecf1f1d5898aa0870e1b2241cda2cac78aba07dd (patch)
treea2c4332b75f3d21016b78512bdb79230796e16ee /debug
parente7ef26fa44999b054cbf36fb909f9737a111c4fb (diff)
Make gdb pretty printer Python3-compatible (bug #800).
Diffstat (limited to 'debug')
-rw-r--r--debug/gdb/printers.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/debug/gdb/printers.py b/debug/gdb/printers.py
index 86996a4f9..0d67a5f99 100644
--- a/debug/gdb/printers.py
+++ b/debug/gdb/printers.py
@@ -49,7 +49,7 @@ class EigenMatrixPrinter:
regex = re.compile('\<.*\>')
m = regex.findall(tag)[0][1:-1]
template_params = m.split(',')
- template_params = map(lambda x:x.replace(" ", ""), template_params)
+ template_params = [x.replace(" ", "") for x in template_params]
if template_params[1] == '-0x00000000000000001' or template_params[1] == '-0x000000001' or template_params[1] == '-1':
self.rows = val['m_storage']['m_rows']
@@ -88,8 +88,11 @@ class EigenMatrixPrinter:
def __iter__ (self):
return self
-
+
def next(self):
+ return self.__next__() # Python 2.x compatibility
+
+ def __next__(self):
row = self.currentRow
col = self.currentCol
@@ -151,8 +154,11 @@ class EigenQuaternionPrinter:
def __iter__ (self):
return self
-
+
def next(self):
+ return self.__next__() # Python 2.x compatibility
+
+ def __next__(self):
element = self.currentElement
if self.currentElement >= 4: #there are 4 elements in a quanternion