是否可以使用Eclipse调试mex代码? [英] Is it possible to debug mex code with Eclipse?

查看:269
本文介绍了是否可以使用Eclipse调试mex代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试写一些mex代码,但是在使用gbd的控制台上进行调试是很痛苦的。是否可以使用Eclipse或Matlab的GUI?如果这些是不可行的方法,那么编写能够提供良好调试功能的mex代码的最佳方式是什么?

解决方案

调试C / gdb中的C ++ MEX文件已在中全面涵盖官方文档,所以我的建议是尝试将gdb与Eclipse CDT集成。



有很多关于如何正确执行的信息,所以我不要在这里重复一切。我知道的最好的教程是IBM的两部分指南,与CDT调试器接口


  1. < a href =http://www.ibm.com/developerworks/library/os-eclipse-cdt-debug1/index.html =noreferrer> 第1部分:了解C / C ++调试器界面 - 涵盖了高级别的基础知识。

  2. 第2部分:使用Eclipse CDT和MI访问gdb - 介绍如何使Eclipse与gdb一起使用。

我认为第2部分是你真正需要的。基本上,您必须安装插件并在Eclipse中进行配置。



还有很多关于这个甚至在StackOverflow上的一些相关问题:


  1. 如何在Eclipse中使用GDB进行C / C ++调试?

  2. < a href =http://stackoverflow.com/questions/4544711/how-to-install-gdb-debugger-to-eclipse-cdt>如何将GDB调试器安装到Eclipse CDT

  3. 使用Eclipse CDT和GDB进行调试

  4. 怎么可以我在使用Eclipse CDT调试时输入命令到gdb提示符

我还没有尝试过,我希望这有效。


I am trying to write some mex code but it is painful to debug it on the console with gbd. Is it possible to use Eclipse or the GUI of Matlab? If these are not feasible methods, what is the best way of writing mex code that provides good debug capabilities?

解决方案

Debugging C/C++ MEX files in gdb is already comprehensively covered in the official documentation, so my suggestion is to try and integrate gdb with Eclipse CDT.

There's plenty of information out there about how to do it properly, so I'm not going to repeat everything here. The best tutorial I know is IBM's two-part guide, "Interfacing with the CDT debugger":

  1. Part 1: Understand the C/C++ debugger interface - covers the high-level basics.
  2. Part 2: Accessing gdb with the Eclipse CDT and MI - explains how to make Eclipse work with gdb.

I think part 2 is what you really need. Basically, you have to install a plug-in and configure it in Eclipse.

There are also quite a few related questions about this even here on StackOverflow:

  1. How do I use GDB in Eclipse for C/C++ Debugging?
  2. How to install GDB debugger to Eclipse CDT
  3. Debugging with Eclipse CDT and GDB
  4. How can I enter commands to a gdb prompt while debugging with Eclipse CDT?

I haven't tried it out yet, so I hope this works.

这篇关于是否可以使用Eclipse调试mex代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆