Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to debug a Mex-C file?

Status
Not open for further replies.

mfm102

Electrical
Joined
Aug 5, 2003
Messages
8
Location
MY
I have a C file with a mex function in it. How to do debugging process for such a file in Matlab? Thank you very much in advance!
 
Hi,
In order to be able to debug a mex file you have to compile it with the -g switch. The debug itself is done using the c\C++ compiler. Details depends on the kind of compiler you are using.

Joe
BSTeX- Equation viewer for Matlab


Joe
BSTeX- Equation viewer for Matlab
 
thanks Joe3,

I'm using gcc compiler on unix SGI platform, matlab version 6.1, release 12. I still can't figure out how to do this debugging process on unix
what i know is (as u said) by typing this command on unix

>>mex -g somefile.c

then what should i do? How am I going to insert the breakpoint in the C file?

Cheers!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top