tehrengruber / lldb-eigen-data-formatter Goto Github PK
View Code? Open in Web Editor NEWLLDB Data Formatter for dense matrices and vectors of the Eigen library
License: GNU General Public License v3.0
LLDB Data Formatter for dense matrices and vectors of the Eigen library
License: GNU General Public License v3.0
Printing of large matrices will probably just fill the screen with garbage. A pretty printer would be useful.
See defrustrator/examples/eigen.cpp
(lldb) p v2
[0
1
1]
#include <Eigen/Dense>
#include <iostream>
int main() {
Eigen::VectorXd a(3, 1);
std::cout << a << std::endl;
}
Eigen vectors of dynamic size won't work if .rows()
and .cols()
are inlined. In order to make this work we need to infer the number of cols from the template parameter and get the number of rows from m_storage.m_rows
I've installed with bash -c "$(curl -fsSL https://raw.githubusercontent.com/tehrengruber/LLDB-Eigen-Data-Formatter/master/tools/install.sh)"
.
Is there anything else I would need to do to get it to work in CLion IDE on a Mac?
Does lldb look in ~/.lldbinit
by default?
This is what I get if ->
(lldb) print this->x_
(Eigen::VectorXd) $4 = None
I used 2to3 to convert LLDB_Eigen_Data_Formatter.py but only with limited success. The matrices now print out in transposed format (which is good enough) but LLDB records error messages along the lines of
Traceback (most recent call last): File "/home/me/.lldb-eigen-data-formatter/LLDB_Eigen_Data_Formatter.py", line 128,
in format_matrix return dynamically_sized_matrix_to_string(valobj) File "/home/me/.lldb-eigen-data-formatter/LLDB_Eigen_Data_Formatter.py", line 121,
in dynamically_sized_matrix_to_string return print_raw_matrix(data, rows, cols) File "/home/me/.lldb-eigen-data-formatter/LLDB_Eigen_Data_Formatter.py", line 51,
in print_raw_matrix output += val.rjust(padding+1, ' ') AttributeError: 'NoneType' object has no attribute 'rjust'
Obviously, the valobj
object is of the type None.
The trail runs cold there.
Any help is warmly appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.