aboutsummaryrefslogtreecommitdiffhomepage
path: root/debug
diff options
context:
space:
mode:
authorGravatar Sameer Sheorey <ssameer@gmail.com>2011-03-02 10:47:54 -0600
committerGravatar Sameer Sheorey <ssameer@gmail.com>2011-03-02 10:47:54 -0600
commite9868f438ba47f225802cf4722a988cf9a3ca756 (patch)
treeed32e92bcb347877b13db92c3f23f553093624dc /debug
parent4f0909b5f0dd78b9e3049637908e61d968d2a37d (diff)
Changed debug/gdb/printers.py to correctly display variable sized matrices.
There is no python error now.
Diffstat (limited to 'debug')
-rw-r--r--debug/gdb/printers.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/debug/gdb/printers.py b/debug/gdb/printers.py
index 3c04407e6..8c991e956 100644
--- a/debug/gdb/printers.py
+++ b/debug/gdb/printers.py
@@ -56,20 +56,22 @@ class EigenMatrixPrinter:
template_params = m.split(',')
template_params = map(lambda x:x.replace(" ", ""), template_params)
- self.rows = int(template_params[1])
- self.cols = int(template_params[2])
+ if template_params[1] == '-0x00000000000000001':
+ self.rows = val['m_storage']['m_rows']
+ else:
+ self.rows = int(template_params[1])
+
+ if template_params[2] == '-0x00000000000000001':
+ self.cols = val['m_storage']['m_cols']
+ else:
+ self.cols = int(template_params[2])
+
self.options = 0 # default value
if len(template_params) > 3:
self.options = template_params[3];
self.rowMajor = (int(self.options) & 0x1)
- if self.rows == 10000:
- self.rows = val['m_storage']['m_rows']
-
- if self.cols == 10000:
- self.cols = val['m_storage']['m_cols']
-
self.innerType = self.type.template_argument(0)
self.val = val