使用Instruments时遭遇“Failed to gain authorization”错误的解决求助
我正在尝试用Instruments追踪一个二进制文件的内存分配情况,但当我把Instruments附加到目标进程时,却弹出了**“Failed to gain authorization”**的错误提示。
我已经按照相关方案添加了get-task-allow权限,之后用codesign命令查看签名信息,确认权限是否生效,执行的命令是:
codesign -dvvv --entitlements=- /Users/ccleve/.pgrx/16.0/pgrx-install/bin/psql
命令输出如下:
Executable=/Users/ccleve/.pgrx/16.0/pgrx-install/bin/psql Identifier=psql-55554944e8e26ef3f50637679e1c2d5ded7430a8 Format=Mach-O thin (arm64) CodeDirectory v=20400 size=6342 flags=0x2(adhoc) hashes=187+7 location=embedded Hash type=sha256 size=32 CandidateCDHash sha256=1b033acfe360f3efe957c00c5b0436bb2e686d61 CandidateCDHashFull sha256=1b033acfe360f3efe957c00c5b0436bb2e686d61c71347c05bc36fb2c653fae2 Hash choices=sha256 CMSDigest=1b033acfe360f3efe957c00c5b0436bb2e686d61c71347c05bc36fb2c653fae2 CMSDigestType=2 Launch Constraints: None CDHash=1b033acfe360f3efe957c00c5b0436bb2e686d61 Signature=adhoc Info.plist=not bound TeamIdentifier=not set Sealed Resources=none Internal requirements count=0 size=12 [Dict] [Key] com.apple.security.get-task-allow [Value] [Bool] true
从输出可以看到com.apple.security.get-task-allow已经被设置为true,但授权失败的问题依然存在。有没有大佬能指点一下,我该怎么解决这个问题?
备注:内容来源于stack exchange,提问作者ccleve
相关产品推荐
相关产品推荐

