This forum has been archived. All content is frozen. Please use KDE Discuss instead.

GDB printer for Block and other submatrix types

Tags: gdb, printer, submatrix, view gdb, printer, submatrix, view gdb, printer, submatrix, view
(comma "," separated)
allanmulin
Registered Member
Posts
14
Karma
0
How can the GDB pretty printer file (printers.py) provided by Eigen be adapted to also print views of a matrix or vector? For example,
Code: Select all
gdb> print submat

where
Code: Select all
auto submat = mat.topLeftCorner(m, n);

I can achieve this manually by casting the submatrix to, say, MatrixXd:
Code: Select all
gdb> print (MatrixXd)submat

However, I would prefer achieving this automatically by adapting the file printers.py so that IDEs (e.g., Eclipse) can show the submatrix entries when hovering with the mouse.

I am only interested in dynamic matrices, MatrixXd, so I would not mind to use a hack, ad-hoc solution.
allanmulin
Registered Member
Posts
14
Karma
0
Any suggestions?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]