【发布时间】:2014-12-12 12:30:56
【问题描述】:
我正在尝试在 Windows 上创建等效的 pdb 文件,以使用单独的调试信息文件进行构建。 我安装并尝试使用 gobjdump 从一个小型 hello world 程序(testDebugging)中删除调试信息。我使用 eclipse 构建了代码,二进制文件运行良好。
我运行 gobjcopy --strip-debug testDebugging 的那一刻,二进制文件的大小减小了。但是当我现在尝试运行二进制文件时,它失败了 "-bash: ./testDebugging: Malformed Mach-o 文件"
即使打开了详细选项,也没有错误消息。 关于为什么这样的基本功能被破坏的任何指示? 版本信息:GNU objcopy (GNU Binutils) 2.24
man 命令如下。
。 “foo”然后...
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.
【问题讨论】: