c++ - c++ 调试不会立即开始运行程序,但重新启动调试器使其再次工作
问题描述
我正在通过调试器运行 C++ 程序,我可能遗漏了一些东西,但这是事件的顺序
gdb bin/COL_sep
copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin19.4.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/COl_sep...
(gdb) run arg1.txt
Starting program: /Users/morph/Code/bin/COL_sep arg1.txt
[New Thread 0x2403 of process 45643]
然后什么都不会永远发生。
但是如果我按退出CTRL+Z
然后再次执行完全相同的操作,程序运行良好。
gdb bin/COL_sep
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin19.4.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/COL_sep...
(gdb) run arg1.txt
Starting program: /Users/morph/Code/bin/COL_sep arg1.txt
[New Thread 0x2803 of process 45665]
[New Thread 0x1b03 of process 45665]
warning: unhandled dyld version (16)
Problem Statistics:
num Nodes: 30
num Arcs: 120
num weights: 20
我不确定为什么它第一次没有运行。每次我重新编译它都不会第一次运行。有人可以让我知道如何纠正这个问题吗?
解决方案
推荐阅读
- php - Woocommerce:设置税款并根据自定义字段值通过挂钩重新计算总计
- python - Tensorflow/Keras - Building multiple models in a loop with the same layer names
- python-3.x - Python Pandas 使用 for 循环添加列
- javascript - 没有模板字符串的输出
- flutter - 如何在颤动中不在导航项列表中的页面中显示底部导航栏?
- json - Python: Reading and Writing HUGE Json files
- github-api - 为什么速率限制与授权和匿名访问 GitHub API 相似?
- python - 如何使用循环创建字典以在 python 中保存数据帧
- python - Buildroot 失败找不到 python 模块:“ImportError:找不到 Cython!”
- python - 使用 Python 从 Excel 单元格中检索格式化文本的索引