How can I set breakpoints in multiple MEX files using DDD or GDB when debugging MEX files in MATLAB 7.8 (R2009a)?
Show older comments
I have a complex MATLAB program that I'm trying to interface and debug with some fairly complex C/C++ code. So I have multiple mex-files created to call different C/C++ functions from an external library. I need some help in setting the breakpoints when I run MATLAB within a debuggger.
I'm currently using ddd which is just a frontend to gdb. The examples in the MATLAB documentation only deal with the simple example of debugging a single mex-file. How do I specify a breakpoint for a specific mex-file?
If I type 'break mexFunction' as specified in the simple example in the documentation. I just get a breakpoint for the very first mexFunction that is called. And if I type break foo.c:mexFunction to stop at the entry point for a specific mex-file, I get the response "No source file named foo.c"
Are there any suggestions or methods to debug mex-files in this situation?
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!