gdb不会在macosx10.10中打开编译过的python

2024-04-19 18:46:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法在Mac OS X 10.10的gdb中打开我编译的Python文件。在

我尝试了以下两种方法来打开文件,但仍然不起作用:

p0sxs-iMac:~ p0sx$ gdb --args /usr/bin/python 

给出错误:

Error message from gdb: not in executable format: File format not recognized

第二种选择:

^{pr2}$

给出错误:

Error message from gdb : not in executable format: File format not recognized

希望有人能帮我。在


Tags: 文件方法infromformatmessageosmac
1条回答
网友
1楼 · 发布于 2024-04-19 18:46:28

看起来gdb不能运行通用二进制文件。见帖子:

file /usr/bin/python /usr/bin/python: Mach-O universal binary with 2 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386

有没有一种方法可以构建gdb来解决这个问题?在

没有。目前gdb无法调试fat二进制文件。使用lipo 提取要使用的体系结构。在

相关问题 更多 >