MATLAB: Debugging mex files on mac

debug mexmacMATLAB

Hi, I'm trying to debug a mex file on mac without using xcode.
In the terminal, I type
$ /Applications/MATLAB_R2012b.app/bin/matlab -Dgdb
and then in the gdb prompt
(gdb) run -nojvm
and I get this error message:
Starting program: /Applications/MATLAB_R2012b.app/bin/maci64/MATLAB -nojvm BFD: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork(i386:x86-64): unknown load command 0x20 2013-07-10 14:14:55.500 MATLAB[9137:f07] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting [Inferior 1 (process 9137) exited with code 01]
Thanks!

Best Answer

For future reference, the problem was that I wasn't using the gdb that comes with mac (in the Xcode CLI tools).
Related Question