How do I debug MEX files on Solaris using gcc/gdb?
1 回表示 (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2013 年 10 月 9 日
回答済み: MathWorks Support Team
2013 年 10 月 25 日
How do I debug MEX files on Solaris using gcc/gdb?
採用された回答
MathWorks Support Team
2013 年 10 月 25 日
This Solution is specific to the GDB debugger on Solaris. For other configurations, please consult the documentation.
In R12.1 to debug MEX-files (and S-functions) using gcc and gdb, you need to compile it using the following code:
mex -g -f gccopts.sh mexfilename.c.
1. Start MATLAB with
matlab -Dgdb
2. At the gdb prompt type:
run -nojvm
3. At the MATLAB prompt type
dbmex on
4. Type the mexfilename.
5. At the gdb prompt type
shared mexfilename.mexsol
6. Type:
break mexFunction
7. Type
continue
You should then end up inside of the mexFunction
This was done using 2.95.2 gcc and 4.16 gdb.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!