$ matlab -Dddd
(gdb) run -nojvm
Matlab comes up just fine. Now at the Matlab prompt, I type:
>> ls
>> dbmex on
(For some reason, if I reverse the order of the two statements above,
the debugger doesn't recognize 'ls' as an internal function and tries
to debug 'cellfun.mexsol', which gets used in Matlab's implementation
of 'ls').
Now I run Matlab's sample code, 'yprime.c', which I previously
compiled with 'mex -g':
>> yprime(1, [4;3;2;1])
In the Matlab window, I get:
MEX FILE: /home/.../yprime.mexsol entry point located at address
0xfc640b64
Add breakpoints at the debugger prompt and issue a "continue" to
resume execution of MATLAB.
In the GDB window, I get the following (minus a bunch of (no
debugging symbols found) messages:
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[New LWP 5]
warning: Lowest section in /usr/lib/libintl.so.1 is .hash at 00000074
Program received signal SIGUSR1, User defined signal 1.
0xfddd91f0 in __sigprocmask () from /usr/lib/libthread.so.1
At this point, everything seems ok as far as I can tell (I can even
view the source code), so I type:
(gdb) break mexFunction
Breakpoint 1 at 0xfc640b84: file yprime.c, line 77.
(gdb) continue
But now, instead of just running to completion, I get the same
message as before:
Program received signal SIGUSR1, User defined signal 1.
0xfddd91f0 in __sigprocmask () from /usr/lib/libthread.so.1
(gdb)
And no matter how many times I type 'continue', I can't get out of
the debug mode and back to the Matlab prompt. What am I doing wrong?
Thanks so much for your help.
P.S. I am running Matlab 6.5R13SP1 on a Unix/Solaris machine with
DDD v3.3.9 and GDB v6.6.