我试图在 emacs 24.3 中编译 7.5 版本的 gdb,但出现未知的加载命令错误。
在此生产部署之前,相同的设置在 OSX 10.6.8 Snow Leopard 平台上运行。
遵循指南( http://sourceware.org/gdb/wiki/BuildingOnDarwin)后,我没有发现代码签名的可执行文件有任何问题。
但是每当我调试一个简单的温度转换程序时,总是出现以下错误:
Current directory is /Users/xyz/Documents/C++....../CPP_Programs_mac/Chap01/Conversion/
BFD: /Users/xyz/Documents/C++......./CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x2
BFD: /Users/xyz/Documents/C++...../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x29
BFD: /Users/xyz/Documents/C++...../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x2b
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin12.3.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
BFD: /Users/xyz/Documents/C++...../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x2a
BFD: /Users/xyz/Documents/C++..../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x28
BFD: /Users/xyz/Documents/C++..../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x29
BFD: /Users/xyz/Documents/C++..../CPP_Programs_mac/Chap01/Conversion/main.out: unknown load command 0x2b
Reading symbols from /Users/xyz/Documents/C++.../CPP_Programs_mac/Chap01/Conversion/main.out...(no debugging symbols found)...done.
(gdb)
即使有这些错误,我仍然可以“开始”(运行)它和另一个缓冲区来执行程序。然后gud画面出现很多错误:
BFD: /usr/lib/libstdc++.6.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libstdc++.6.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libSystem.B.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libSystem.B.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libc++abi.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libc++abi.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcache.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcache.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcommonCrypto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcommonCrypto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcompiler_rt.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcompiler_rt.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcopyfile.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcopyfile.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdispatch.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdispatch.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdnsinfo.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdnsinfo.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libdyld.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libdyld.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libkeymgr.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libkeymgr.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/liblaunch.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/liblaunch.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libmacho.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libmacho.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libquarantine.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libquarantine.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libremovefile.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libremovefile.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_blocks.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_blocks.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_c.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_c.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_dnssd.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_dnssd.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_info.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_info.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_kernel.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_kernel.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_m.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_m.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_network.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_network.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_notify.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_notify.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libsystem_sandbox.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libsystem_sandbox.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libunc.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libunc.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libunwind.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libunwind.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libxpc.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libxpc.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/system/libcorecrypto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/system/libcorecrypto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libobjc.A.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libobjc.A.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libauto.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libauto.dylib(i386:x86-64): unknown load command 0x2b
BFD: /usr/lib/libc++.1.dylib(i386:x86-64): unknown load command 0x2a
BFD: /usr/lib/libc++.1.dylib(i386:x86-64): unknown load command 0x2b
(gdb)
在终端中运行 gdb 有同样的错误。我非常努力地google,发现去年很多用户报告了这些错误。我想知道新版本的 gdb 是否解决了这些问题。
有没有人在山狮的 gdb 7.5 中取得成功?甚至根本尝试过gdb 7.6?
谢谢