【问题标题】:r lldb debugger with R fails带有 R 的 lldb 调试器失败
【发布时间】:2022-01-10 05:13:50
【问题描述】:

刚刚开始尝试按照 [url] 1 中的步骤在 R 中使用 lldb 调试器。我没有走得很远。在终端窗口中,R -d lldb 打开一个 lldb 提示符。当我将run 放入该提示时,我收到以下错误消息。

error: process exited with status -1 (attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))

在控制台应用程序中,我看到一个调试服务器错误,显示“附加失败”,另一个显示错误消息。就在这之前。

error: [LaunchAttach] END (90757) MachProcess::AttachForDebug failed to start exception thread attaching to pid 90756: unable to start the exception thread

但他们没有为我提供任何指导。

我正在使用带有 Apple Silicon 的新 MacBook Pro 和适用于 arch 64 的 R 版本。

【问题讨论】:

    标签: r lldb


    【解决方案1】:

    操作系统将只允许调试器附加到已用正确权利标记自己的二进制文件,表明它们选择接受调试。大多数组不会将其发布二进制文件标记为可调试。大概这对于您正在调试的二进制文件是正确的。您可以使用codesign -d --entitlements - <Binary> 检查此二进制文件的权利。要可调试,它必须将 get_task_allow 权利设置为 true。

    【讨论】:

    • 当我运行 R -d lldb 时,我收到消息 "target create "/Library/Frameworks/R.framework/Resources/bin/exec/R" Current executable set to '/Library/Frameworks /R.framework/Resources/bin/exec/R' (arm64)" 当我返回 shell 并运行" codesign -d --entitlements - /Library/Frameworks/R.framework/Resources/bin/exec/R"我得到了几个关键值,但没有一个关于权利的值。
    • 虽然允许调试的权利是一个布尔值,但如果它不存在,它也默认为“不允许”。我不知道构建 R 有多难,但如果你手动构建它,大概会有一个可调试的配置。这可能是您最好的选择。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-13
    • 2016-11-20
    相关资源
    最近更新 更多