1

我正在尝试在 Windows 上创建等效的 pdb 文件,以使用单独的调试信息文件进行构建。我安装并尝试使用 gobjdump 从一个小型 hello world 程序(testDebugging)中删除调试信息。我使用 eclipse 构建了代码,二进制文件运行良好。

我运行 gobjcopy --strip-debug testDebugging 的那一刻,二进制文件的大小减小了。但是当我现在尝试运行二进制文件时,它会因“-bash: ./testDebugging: Malformed Mach-o file”而失败

即使打开了详细选项,也没有错误消息。关于为什么这样的基本功能被破坏的任何指示?版本信息:GNU objcopy (GNU Binutils) 2.24

人命令说下面。

. “富”然后...

       1.<Run "objcopy --only-keep-debug foo foo.dbg" to>
           create a file containing the debugging info.

       1.<Run "objcopy --strip-debug foo" to create a>
           stripped executable.

       1.<Run "objcopy --add-gnu-debuglink=foo.dbg foo">
           to add a link to the debugging info into the stripped
           executable.
4

1 回答 1

0

用什么dsymutil代替呢?

$ xcrun dsymutil binfile -o binfile.dSYM

(这假设您使用的是 Xcode 命令行工具)。

于 2014-12-12T12:36:41.750 回答