如何阻止GDB执行“break main”默认情况下在Eclipse中? [英] How to stop GDB from executing "break main" by default in Eclipse?

查看:187
本文介绍了如何阻止GDB执行“break main”默认情况下在Eclipse中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse和MinGW开展C项目。当运行此项目的调试版本时,gdb将始终在输入 main()时中断。我可以看到为什么这可能是有用的,但对于我目前的项目,我不希望发生这种情况。



我已经看到有一个命令

 (gdb)break main 

这将在命令行运行时完成相同的行为。



目前我没有.gdbinit文件。



当从命令行运行时,gdb不会停止进入main,而是从Eclipse运行时。



如何使Eclipse在默认情况下使GDB停止进入主页?

解决方案

确保您处于c ++视角,然后转到菜单运行 - > 调试配置。确保您的应用程序在左窗格中选择,按 Debugger 选项卡,然后取消选中停止在启动时:复选框。



编辑:您可以在这里看到一个屏幕截图: Eclipse CDT中的方法/功能断点


I'm working on a C project with Eclipse and MinGW. When running a debug build of this project, gdb always breaks on entering main(). I can see why this could be useful, but for my current project I don't want that to happen.

I've read that there is a command

(gdb) break main

which will accomplish the same behavior when running from the command line.

At the moment I do NOT have a .gdbinit file.

At the moment gdb doesn't stop on entering main when running from the command line, but it does when running from Eclipse.

How do I make GDB stop breaking on entering main by default within Eclipse?

解决方案

Make sure you are in the c++ perspective, then go to menu Run -> Debug Configurations. Make sure your application is chosen in the left pane, press the Debugger tab, and uncheck Stop on startup at: checkbox.

EDIT: you can see a screen-shot here: Method/Function Breakpoints in Eclipse CDT

这篇关于如何阻止GDB执行“break main”默认情况下在Eclipse中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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