gpt4 book ai didi

macos - gdb 失败并出现 "Unable to find Mach task port for process-id"错误

转载 作者:行者123 更新时间:2023-12-03 04:29:02 26 4
gpt4 key购买 nike

我的应用程序运行良好,但 gdb 无法调试它并出现以下错误

(gdb) run
Starting program: /path/to/app
Unable to find Mach task port for process-id 83767: (os/kern) failure (0x5).

我使用的是 OS X Lion。 GDB版本是

$ gdb --version
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".

最佳答案

当我更改为sudo gdb可执行文件名时,它就起作用了! :)

关于macos - gdb 失败并出现 "Unable to find Mach task port for process-id"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11504377/

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