×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to debug a Mex-C file?

How to debug a Mex-C file?

How to debug a Mex-C file?

(OP)
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!

RE: How to debug a Mex-C file?

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
http://www.geocities.com/bstex2001

Joe
BSTeX- Equation viewer for Matlab
http://www.geocities.com/bstex2001

RE: How to debug a Mex-C file?

(OP)
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!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources