Why do I receive an error when trying to launch MATLAB 7.1 (R14SP3) with -Dgdb option?

1 view (last 30 days)
When I execute the following commands:
matlab -Dgdb %%at the LINUX command prompt
run %%at the GDB command prompt
I receive the following result:
Starting program: /apps/mathworks/matlab/7.1.0_R14-SP3/bin/glnxa64/MATLAB
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled] [New Thread 182995308480 (LWP 14794)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [New Thread 1084230000 (LWP 14803)] [New Thread 1094719856 (LWP 14804)] [New Thread 1095772528 (LWP 14824)] [New Thread 1096825200 (LWP 14825)] [New Thread 1097877872 (LWP 14826)] [New Thread 1098930544 (LWP 14827)] [New Thread 1099983216 (LWP 14828)] [New Thread 1104181616 (LWP 14829)] [New Thread 1108380016 (LWP 14830)] [New Thread 1112578416 (LWP 14831)] [New Thread 1113631088 (LWP 14832)] [New Thread 1114683760 (LWP 14834)] [New Thread 1115736432 (LWP 14847)] [New Thread 1116789104 (LWP 14848)] [New Thread 1117841776 (LWP 14849)] [New Thread 1118894448 (LWP 14850)] [New Thread 1119947120 (LWP 14851)] [New Thread 1120999792 (LWP 14852)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1117841776 (LWP 14849)] 0x0000002a9fa8505e in ?? ()

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This issue occurs because Java expects segmentation violation signals (SIGSEGV) to be thrown in certain operations, traps them, and deals with them or turns them into Java exceptions. To work around this issue, consider the following options:
1) If Java is not required, then start MATLAB with the '-nojvm' option by executing the following command at the GDB command prompt to resolve this issue:
run -nojvm
2) If Java is required, then turn off the debugger trap for SIGSEGV while starting MATLAB and turn it on just before executing the MEX file. This can be achieved by executing the following commands at the GDB prompt while starting MATLAB:
handle SIGSEGV nostop
run
Once MATLAB is running, set a breakpoint in the MEX file and then continue until the breakpoint is reached. Then, type the following at the GDB command prompt
handle SIGSEGV stop
to allow the debugger to start trapping SIGSEGV again. Note that the above commands are GDB commands issued to the GDB prompt (not the MATLAB prompt), and other debuggers have different ways of doing the same thing.

More Answers (0)

Products


Release

R14SP2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!