Skip to content

Instantly share code, notes, and snippets.

@ManasJayanth
Forked from hlissner/codesign_gdb.md
Created January 25, 2019 05:57
Show Gist options
  • Select an option

  • Save ManasJayanth/7851ced9509ce45c5db7f7313a34902a to your computer and use it in GitHub Desktop.

Select an option

Save ManasJayanth/7851ced9509ce45c5db7f7313a34902a to your computer and use it in GitHub Desktop.

Revisions

  1. Henrik Lissner revised this gist Oct 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion codesign_gdb.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    > Note: these instructions are for pre-Sierra MacOS.
    > Note: these instructions are for pre-Sierra MacOS. Sierra Users: see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.
    If you are getting this in gdb on OSX while trying to run a program:

  2. Henrik Lissner revised this gist Oct 16, 2017. 1 changed file with 18 additions and 16 deletions.
    34 changes: 18 additions & 16 deletions codesign_gdb.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    > Note: these instructions are for pre-Sierra MacOS.
    If you are getting this in gdb on OSX while trying to run a program:

    ```bash
    @@ -6,24 +8,24 @@ Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
    ```

    1. Open Keychain Access
    2. In menu, open **Keychain Access > Certificate Assistant > Create a certificate**
    2. In the menu, open **Keychain Access > Certificate Assistant > Create a certificate**
    3. Give it a name (e.g. `gdbc`)
    + Identity type: Self Signed Root
    + Certificate type: Code Signing
    + Check: let me override defaults
    4. Continue until "specify a location for..."
    5. Keychain = System
    6. Close. Find certificate in System keychains.
    7. _Get Info_
    + Identity type: Self Signed Root
    + Certificate type: Code Signing
    + Check: let me override defaults
    4. Continue until it prompts you for: "specify a location for..."
    5. Set Keychain location to System
    6. Create a certificate and close assistant.
    7. Find the certificate in System keychains, right click it > get info (or just double click it)
    8. Expand **Trust**, set **Code signing** to `always trust`
    9. `killall taskgated`
    9. Restart taskgated in terminal: `killall taskgated`
    10. Enable root account:
    1. Open System Preferences
    2. Go to User & Groups > Unlock
    3. Login Options > "Join" (next to Network Account Server)
    4. Click "Open Directory Utility"
    5. Go up to **Edit > Enable Root User**
    11. `codesign -fs gdbc /usr/local/bin/gdb` -- asks for root password
    12. Disable root account
    1. Open System Preferences
    2. Go to User & Groups > Unlock
    3. Login Options > "Join" (next to Network Account Server)
    4. Click "Open Directory Utility"
    5. Go up to **Edit > Enable Root User**
    11. Run `codesign -fs gdbc /usr/local/bin/gdb` in terminal: this asks for the root password
    12. Disable root account (see #10)

    Done!
  3. @hlissner hlissner revised this gist Mar 31, 2016. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions codesign_gdb.md
    Original file line number Diff line number Diff line change
    @@ -5,20 +5,19 @@ Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
    (please check gdb is codesigned - see taskgated(8))
    ```

    1. Install gdb
    2. Open Keychain Access
    3. In menu, open **Keychain Access > Certificate Assistant > Create a certificate**
    4. Give it a name (e.g. `gdbc`)
    1. Open Keychain Access
    2. In menu, open **Keychain Access > Certificate Assistant > Create a certificate**
    3. Give it a name (e.g. `gdbc`)
    + Identity type: Self Signed Root
    + Certificate type: Code Signing
    + Check: let me override defaults
    5. Continue until "specify a location for..."
    6. Keychain = System
    7. Close. Find certificate in System keychains.
    8. _Get Info_
    9. Expand **Trust**, set **Code signing** to `always trust`
    10. `killall taskgated`
    11. Enable root account:
    4. Continue until "specify a location for..."
    5. Keychain = System
    6. Close. Find certificate in System keychains.
    7. _Get Info_
    8. Expand **Trust**, set **Code signing** to `always trust`
    9. `killall taskgated`
    10. Enable root account:
    1. Open System Preferences
    2. Go to User & Groups > Unlock
    3. Login Options > "Join" (next to Network Account Server)
  4. @hlissner hlissner revised this gist Mar 31, 2016. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions codesign_gdb.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,10 @@
    If you are getting this in gdb on OSX while trying to run a program:

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

    1. Install gdb
    2. Open Keychain Access
    3. In menu, open **Keychain Access > Certificate Assistant > Create a certificate**
  5. @hlissner hlissner created this gist Mar 31, 2016.
    23 changes: 23 additions & 0 deletions codesign_gdb.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    1. Install gdb
    2. Open Keychain Access
    3. In menu, open **Keychain Access > Certificate Assistant > Create a certificate**
    4. Give it a name (e.g. `gdbc`)
    + Identity type: Self Signed Root
    + Certificate type: Code Signing
    + Check: let me override defaults
    5. Continue until "specify a location for..."
    6. Keychain = System
    7. Close. Find certificate in System keychains.
    8. _Get Info_
    9. Expand **Trust**, set **Code signing** to `always trust`
    10. `killall taskgated`
    11. Enable root account:
    1. Open System Preferences
    2. Go to User & Groups > Unlock
    3. Login Options > "Join" (next to Network Account Server)
    4. Click "Open Directory Utility"
    5. Go up to **Edit > Enable Root User**
    11. `codesign -fs gdbc /usr/local/bin/gdb` -- asks for root password
    12. Disable root account

    Done!