This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 210 | Differences between
and this patch

Collapse All | Expand All

(-)a/debug/gdb/printers.py (-8 / +10 lines)
Lines 51-80 class EigenMatrixPrinter: Link Here
51
			type = type.target()
51
			type = type.target()
52
		self.type = type.unqualified().strip_typedefs()
52
		self.type = type.unqualified().strip_typedefs()
53
		tag = self.type.tag
53
		tag = self.type.tag
54
		regex = re.compile('\<.*\>')
54
		regex = re.compile('\<.*\>')
55
		m = regex.findall(tag)[0][1:-1]
55
		m = regex.findall(tag)[0][1:-1]
56
		template_params = m.split(',')
56
		template_params = m.split(',')
57
		template_params = map(lambda x:x.replace(" ", ""), template_params)
57
		template_params = map(lambda x:x.replace(" ", ""), template_params)
58
58
59
		self.rows = int(template_params[1])
59
		if template_params[1] == '-0x00000000000000001':
60
		self.cols = int(template_params[2])
60
			self.rows = val['m_storage']['m_rows']
61
		else:
62
			self.rows = int(template_params[1])
63
		
64
		if template_params[2] == '-0x00000000000000001':
65
			self.cols = val['m_storage']['m_cols']
66
		else:
67
			self.cols = int(template_params[2])
68
		
61
		self.options = 0 # default value
69
		self.options = 0 # default value
62
		if len(template_params) > 3:
70
		if len(template_params) > 3:
63
			self.options = template_params[3];
71
			self.options = template_params[3];
64
		
72
		
65
		self.rowMajor = (int(self.options) & 0x1)
73
		self.rowMajor = (int(self.options) & 0x1)
66
74
67
		if self.rows == 10000:
68
			self.rows = val['m_storage']['m_rows']
69
70
		if self.cols == 10000:
71
			self.cols = val['m_storage']['m_cols']
72
73
		self.innerType = self.type.template_argument(0)
75
		self.innerType = self.type.template_argument(0)
74
76
75
		self.val = val
77
		self.val = val
76
		
78
		
77
		# Fixed size matrices have a struct as their storage, so we need to walk through this
79
		# Fixed size matrices have a struct as their storage, so we need to walk through this
78
		self.data = self.val['m_storage']['m_data']
80
		self.data = self.val['m_storage']['m_data']
79
		if self.data.type.code == gdb.TYPE_CODE_STRUCT:
81
		if self.data.type.code == gdb.TYPE_CODE_STRUCT:
80
			self.data = self.data['array']
82
			self.data = self.data['array']

Return to bug 210