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

Using Eclipse CDT to debug Eigen

Tags: None
(comma "," separated)
benjo
Registered Member
Posts
1
Karma
0
OS

Using Eclipse CDT to debug Eigen

Mon May 23, 2011 7:41 pm
Hi gang,

I'm using Eclipse CDT to develop a small program. It is easy enough to debug this small program using std::cout << mtx, but for something that is larger I do not want to wait for the whole thing to recompile any new std::cout statements. Instead, I would rather just be able to view the contents of a matrix from within CDT.

I know that this is possible using visual studio, and the information to do this is given; however, I am stuck with Eclipse.

Any thoughts on how to do this?

-Ben
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I don't know anything about eclipse but I guess its debugger is based on gdb, and in eigen/debug/gdb/ you will find a python plugin for gdb. Might work with eclipse too. Please keep us informed if that works!
kp0987
Registered Member
Posts
21
Karma
0
Looks interesting. I would like to see if this will work in Xcode (also uses GDB).

The instructions in the printers.py file do not seem complete:
Code: Select all
# To use it:
#
# * create a directory and put the file as well as an empty __init__.py in that directory
# * Create a ~/.gdbinit file, that contains the following:


Can you provide a bit more guidance? It's probably simple I know, but I am not too familiar with python.

Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
indeed! Quoting the author of this plugin:

To use it:

* create a directory and put the file as well as an empty __init__.py in
that directory
* Create a ~/.gdbinit file, that contains the following:

python
import sys
sys.path.insert(0, '/path/to/eigen/printer/directory')
from printers import register_eigen_printers
register_eigen_printers (None)
end
kp0987
Registered Member
Posts
21
Karma
0
Thanks. Unfortunately this will not work in Xcode (3 or 4) as the GDB version is too old (v6) and does not support python. It is not possible (apparently) to use v7 with Xcode, but command line may be possible.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar