Debugging Matlab Mex Files with Eclipse+CDT [message #184538] |
Tue, 13 February 2007 10:35 |
Eclipse User |
|
|
|
Originally posted by: st.netrent.ch
Hi all,
For those who are interested, i made this little Flash tutorial on how
to use eclipse to debug mex-files under linux.
http://info-te.ch/~geli/mexdebug/mexdebug.html
This should also work on Windows if you install gnumex
(http://gnumex.sourceforge.net/) in combination with the MinGW compiler.
But when useing windows, do not debug matlab from start, instead start
matlab, execute your mex file (in order for matlab to load the
corresponding dll !!!)
-------
Tip: make shure that your mexfile "return;"s if for instance
"nlhs==0"... so you can execute (and thus load) the mex file without
harming matlab: This is usefull if you want to debug Segmentation
Violations etc...
-------
then attach with eclipse to your MATLAB process, set your breakpoints
etc... resume matlab and call your mexfile again with the appropriate
parameters
Best regards
Geli
|
|
|
Re: Debugging Matlab Mex Files with Eclipse+CDT [message #187000 is a reply to message #184538] |
Sun, 04 March 2007 21:31 |
Eclipse User |
|
|
|
Originally posted by: elliottwaldron.gmail.com
Geli wrote:
> Hi all,
> For those who are interested, i made this little Flash tutorial on how
> to use eclipse to debug mex-files under linux.
>
> http://info-te.ch/~geli/mexdebug/mexdebug.html
>
> This should also work on Windows if you install gnumex
> (http://gnumex.sourceforge.net/) in combination with the MinGW compiler.
> But when useing windows, do not debug matlab from start, instead start
> matlab, execute your mex file (in order for matlab to load the
> corresponding dll !!!)
> -------
> Tip: make shure that your mexfile "return;"s if for instance
> "nlhs==0"... so you can execute (and thus load) the mex file without
> harming matlab: This is usefull if you want to debug Segmentation
> Violations etc...
> -------
> then attach with eclipse to your MATLAB process, set your breakpoints
> etc... resume matlab and call your mexfile again with the appropriate
> parameters
>
> Best regards
> Geli
>
>
Thanks for the tutorial, it was a great help for me as I am new to
Eclipse. I am trying to debug mex files on Windows using MinGW/gnumex.
I can build the mex file using make, but I am not sure how to get
Eclipse and Matlab to talk to each other when, as you state, you need to
launch MATLAB and execute the mex DLL independently of Eclipse.
Thanks in advance.
Elliott
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03530 seconds