在OSX上“El capitan”也签了GDB不运行

时间:2016-06-02 14:59:12

标签: macos gdb osx-elcapitan

今天我从macports gdb debugger;安装了我已签名GDB网上的所有文件,并附有自签名代码签名证书。

尽管gdb没有运行通常的错误:

`Unable to find Mach task port for process-id 1217: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))`

如果使用gdb运行sudo,则可以正常使用。

两条线索:

  1. 签名时,我被迫sudo,否则:

    /opt/local/bin/ggdb: replacing existing signature error: /Applications/Xcode.app/Contents/Developer/Toolchains /XcodeDefault.xctoolchain/usr/bin/codesign_allocate: can't create output file: /opt/local/bin/ggdb.cstemp (Permission denied) /opt/local/bin/ggdb: the codesign_allocate helper tool cannot be found or used

  2. 我用以下方式验证了签名:

    codesign --verify --verbose=9 /opt/local/bin/ggdb

  3. 结果是:

    `/opt/local/bin/ggdb: valid on disk
    /opt/local/bin/ggdb: satisfies its Designated Requirement`
    

    和:

    codesign --display --verbose=9 /opt/local/bin/ggdb
    
    Executable=/opt/local/bin/ggdb
    Identifier=org.gnu.gdb
    Format=Mach-O thin (x86_64)
    CodeDirectory v=20100 size=42012 flags=0x0(none) hashes=1309+2 location=embedded
    Hash type=sha256 size=32
    CandidateCDHash sha1=fcdc413a6e9a46c43dbf5a6bef10dfc9ca859139
    CandidateCDHash sha256=299f6ddc02c908d00f2ec0e858cff9ff44732f03
    Hash choices=sha1,sha256
    -2=9181fb83a0797cdc555934e7e0b1ae35e91cf32040ebf25af11bf5bc1f1c5947
    [Lots of hex...]
    1307=6720981bf5bd01662bf60c634c900bc93bc5c4628db492f2865f17b7316eb0ef
    1308=04de6d07a1d252c0f5b88640956b83a4d77594d7f175929c486434abea1e99c1
    CDHash=299f6ddc02c908d00f2ec0e858cff9ff44732f03
    Signature size=1745
    Authority=gdb-cert
    Signed Time=2-giu-2016, 16:11:02
    Info.plist entries=4
    TeamIdentifier=not set
    Sealed Resources=none
    Internal requirements count=1 size=88
    

    解决这个问题的任何线索都会有很大帮助!

    谢谢。

0 个答案:

没有答案