gpt4 book ai didi

macos - gdb 在 mac os catalina 上调用 `run` 后挂起

转载 作者:行者123 更新时间:2023-12-03 17:24:40 26 4
gpt4 key购买 nike

系统:

mac osx catalina (10.15.5)
gfortran 9.3.0 (from homebrew)
gdb 9.2 (from homebrew)

经历并遵循以下说明:
https://sourceware.org/gdb/wiki/PermissionsDarwin

试图调试这个程序只是为了学习:
! test.f90
program main
integer :: val
val = 1
print *, val
val = 2
print *, val
end program main

编译:
gfortran test.f90 -Og -g -o test

然后在终端
~/Coding/gdb
> ./test
1
2
~/Coding/gdb $
> gdb test
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 test...
Reading symbols from /Users/a3r7lzz/Coding/gdb/test.dSYM/Contents/Resources/DWARF/test...
(gdb) run
Starting program: /Users/a3r7lzz/Coding/gdb/test
[New Thread 0x1803 of process 3054]

在这一点上什么也没有发生......它只是挂起并且无法用Ctrl-C杀死它,我必须去事件监视器杀死gdb。想知道我是否在设置中遗漏了什么,或者是否有人有任何其他想法为什么这可能是

最佳答案

您可以使用 Ctrl-Z 终止挂起。
尝试运行几次,正确设置后它似乎只在某些时候工作。

关于macos - gdb 在 mac os catalina 上调用 `run` 后挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62474236/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com