Last week I was using cuda and after an hour trying to debug my code I decided to see if cuda had something similar to gdb and I came across cuda-gdb . Happy, I opened my terminal and typed in a simple command to debug my small cuda application, unfortunately, I directly received an error message similar to this :
123 Starting program: /x/y/fooUnable to find Mach task port for process-id 285: (os/kern) failure (0x5).(please check cuda-gdb is codesigned - see taskgated(8))
After a minute staring at my screen, I recalled a skype-talk with a friend telling me that last time created a certificate to allow cuda-gdb ! and there I was, wondering how to create a certificate. The reason for this is that the Darwin kernel do not allow gdb or cuda-gdb to debug other processes if it does not have special rights, since debugging a process might allow a hacker to take control over it. So I used this method :
Step 1:
Open “Keychain Access” via
1 |
/Applications/Utilities/Keychain Access.app |
Or via spotlight
Step2:
- Click on the “Keychain Access” menu in the left corner of your screen :
- Select “Certificate Assistant“.
- Click on “Create a Certificate“.
Step 3:
- Set the “Identity Type” to “Self Signed Root”.
- Set “Certificate Type” to “Code Signing”.
- Finally select “Let me override defaults”
- Click on “Create”.
Step 4:
- Click on “Continue” a few times until you seing the following window :
- Change the “Keychain” to “System”.
- Click on “Create“
Step 5:
- Find the certificate and right click on it .
- Select “Get Info”.
- Open the “Trust” item and modify “Code Signing” to “Always Trust”.
Post a Comment