Skip to content

Use cuda-gdb on OS X Mountain Lion

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 :

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

Or via spotlight


  • 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”.
Close everything, and you should now be able to use cuda-gdb in your terminal without any problems.

Post a Comment

Your email is never published nor shared. Required fields are marked *