How to stop GDB from executing quot;break mainquot; by default in Eclipse?(如何阻止 GDB 执行“break main默认情况下在 Eclipse 中?)
问题描述
我正在使用 Eclipse 和 MinGW 开发一个 C 项目.运行此项目的调试版本时,gdb 总是在输入 main()
时中断.我明白为什么这很有用,但对于我当前的项目,我不希望发生这种情况.
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.
我读到有一个命令
(gdb) break main
从命令行运行时会完成相同的行为.
which will accomplish the same behavior when running from the command line.
目前我没有 .gdbinit 文件.
At the moment I do NOT have a .gdbinit file.
目前 gdb 在从命令行运行时不会在进入 main 时停止,但在从 Eclipse 运行时会停止.
At the moment gdb doesn't stop on entering main when running from the command line, but it does when running from Eclipse.
如何让 GDB 在 Eclipse 中默认进入 main 时停止中断?
How do I make GDB stop breaking on entering main by default within Eclipse?
推荐答案
确保你在 c++ 透视图中,然后转到菜单 Run
-> Debug Configurations
.确保在左侧窗格中选择了您的应用程序,按 Debugger
选项卡,然后取消选中 Stop on startup at:
复选框.
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.
您可以在此处查看屏幕截图:Method/Eclipse CDT 中的函数断点
you can see a screen-shot here: Method/Function Breakpoints in Eclipse CDT
这篇关于如何阻止 GDB 执行“break main"默认情况下在 Eclipse 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何阻止 GDB 执行“break main"默认情况下在 Eclipse 中?


- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01