Skip to content

Instantly share code, notes, and snippets.

@firstrow
Created October 4, 2019 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firstrow/cbeb118018ef7326b9f2f108310e2a69 to your computer and use it in GitHub Desktop.
Save firstrow/cbeb118018ef7326b9f2f108310e2a69 to your computer and use it in GitHub Desktop.
MacOS Mojave GDB cosign
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.disable-executable-page-protection</key>
    <true/>
    <key>com.apple.security.cs.debugger</key>
    <true/>
    <key>com.apple.security.get-task-allow</key>
    <true/>
</dict>
</plist>

With the file saved (in my case as gdb.xml) then the final setup is:

codesign --entitlements gdb.xml -fs gdb-cert /usr/local/bin/gdb

Full story: https://timnash.co.uk/getting-gdb-to-semi-reliably-work-on-mojave-macos/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment