Bugzilla – Attachment 113 Details for
Bug 210
gdb does not display variable sized matrices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Mercurial patch.
gdb_printers.patch (text/plain), 1.71 KB, created by
Sameer Sheorey
on 2011-03-02 16:04:03 UTC
(
hide
)
Description:
Mercurial patch.
Filename:
MIME Type:
Creator:
Sameer Sheorey
Created:
2011-03-02 16:04:03 UTC
Size:
1.71 KB
patch
obsolete
># HG changeset patch ># User Sameer Sheorey <ssameer@gmail.com> ># Date 1299077537 21600 ># Node ID a239f018c59bd2b0445a67a97d497c7f41d44091 ># Parent 7090675b5e1558742ce5f12a7fa8872e7194290b >printers.py now correctly displays variable sized matrices, since the size is >now -0x1 instead of 10000. > >diff --git a/debug/gdb/printers.py b/debug/gdb/printers.py >--- a/debug/gdb/printers.py >+++ b/debug/gdb/printers.py >@@ -50,31 +50,33 @@ class EigenMatrixPrinter: > if type.code == gdb.TYPE_CODE_REF: > type = type.target() > self.type = type.unqualified().strip_typedefs() > tag = self.type.tag > regex = re.compile('\<.*\>') > m = regex.findall(tag)[0][1:-1] > 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[1] == '-0x00000000000000001': >+ self.cols = val['m_storage']['m_rows'] >+ 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 > > # Fixed size matrices have a struct as their storage, so we need to walk through this > self.data = self.val['m_storage']['m_data'] > if self.data.type.code == gdb.TYPE_CODE_STRUCT: > self.data = self.data['array']
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210
:
113
|
114