来自 OpenBSD 端口的 lldb 无法启动或调试任何程序

问题描述

我安装了一个新的 OpenBSD(当前)。 我已经安装了 llvmlldb 软件包。 尝试调试程序时,/usr/local/bin/lldb 无法启动或调试进程,但 /usr/bin/lldb 工作正常。 我使用 lldb 包是因为我想测试 python 脚本。

安装 OpenBSD 后,这些是重现 lldb 问题的命令:

obsdtest$ uname -a
OpenBSD obsdtest.thelinuxkitten.home 6.9 GENERIC#433 amd64
obsdtest$ sysctl -n kern.version
OpenBSD 6.9-beta (GENERIC) #433: Wed Mar 31 18:35:11 MDT 2021
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
obsdtest$ su -
obsdtest# pkg_add -v llvm lldb
obsdtest# exit
obsdtest$ echo "#include <stdio.h>\nint main(int argc,char *argv[])\n{\n    printf(\"Hi OpenBSD.\\\n\");\n    return 0;\n}\n" > hiobsd.c
obsdtest$ /usr/local/bin/clang -g hiobsd.c
obsdtest$ whereis -a lldb
/usr/bin/lldb
/usr/local/bin/lldb
obsdtest$ lldb -b -o 'process launch' a.out 
(lldb) target create "a.out"
Current executable set to '/home/kitten/a.out' (x86_64).
(lldb) process launch
Hi OpenBSD.
Process 45195 exited with status = 0 (0x00000000) 

Process 45195 launched: '/home/kitten/a.out' (x86_64)
obsdtest$ /usr/local/bin/lldb -b -o 'process launch' a.out 
(lldb) target create "a.out"
Current executable set to '/home/kitten/a.out' (x86_64).
(lldb) process launch
error: Failed to launch or debug process
obsdtest$ 

阅读 lldb 文档后,我不知道可能会发生什么,或者我做错了什么。

提前致谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)