skip to Main Content

But it works fine with Instruments->Time Profiler.

All the other documents are closed.

Am trying to find a tool to find how much memory is used by my c++ code.

2

Answers


  1. You can fix this without disabling SIP by running the following command in zsh. It will sign your binary with the get-task-allow entitlement, which allows debugging.

    codesign -s - -v -f --entitlements =(echo -n '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>com.apple.security.get-task-allow</key>
            <true/>
        </dict>
    </plist>') <your executable>
    

    Source: https://cocoaphony.micro.blog/2022/10/29/solving-required-kernel.html

    Thanks to Mārtiņš Možeiko for pointing me toward this solution.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search