Closed randi120 closed 6 years ago
First of all thanks for sharing this. I'm too busy right now to review this in detail, but one thing I (might) have spotted was that your check whether the given Eigen type is of fixed size or dynamic is not very robust. You might get an expression template that has a different memory layout than that of simple matrices/vectors. In that case we should fall back to the LLDB's default printer. I didn't check this but I assume that since expressions like
auto a = Eigen::VectorXd::Ones(10).dot(Eigen::VectorXd::Ones(10))
are not supported currently (stay tuned for https://github.com/tehrengruber/Defrustrator which will support this) your code will fail and should as such fall back correctly to the default printer.
Since all ways to determine what type of Eigen object we have (e.g. an expression template) I can come up with are not really maintainable I'll accept your pull request. Thanks for your work.
@tehrengruber nice script. I needed dynamic size support (#1). I tested it with basic types:
Should be working. (lines 56-58 should have some check for validity)