Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | On MacOSX lldb needs to be code signed. The Debug and Release builds |
| 2 | are set to code sign using a code signing certificate named |
| 3 | lldb_codesign. |
| 4 | |
| 5 | If you don't have one yet you will need to: |
| 6 | - Launch /Applications/Utilities/Keychain Access.app |
| 7 | |
| 8 | - In Keychain Access select the "login" keychain in the "Keychains" |
| 9 | list in the upper left hand corner of the window. |
| 10 | |
| 11 | - Select the following menu item: |
| 12 | |
| 13 | Keychain Access->Certificate Assistant->Create a Certificate... |
| 14 | |
| 15 | - Set the following settings |
| 16 | |
| 17 | Name = lldb_codesign |
| 18 | Identity Type = Self Signed Root |
| 19 | Certificate Type = Code Signing |
| 20 | |
Johnny Chen | 79f1106 | 2011-07-20 19:29:08 +0000 | [diff] [blame] | 21 | - Click Create |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 22 | - Click Continue |
| 23 | - Click Done |
| 24 | - Click on the "My Certificates" |
| 25 | - Double click on your new lldb_codesign certificate |
| 26 | - Turn down the "Trust" disclosure triangle |
| 27 | |
| 28 | Change: |
| 29 | When using this certificate: Always Trust |
| 30 | |
| 31 | - Enter your login password to confirm and make it trusted |
| 32 | |
| 33 | The next steps are necessary on SnowLeopard, but are probably because of a bug |
Jim Ingham | 360725b | 2010-06-25 00:34:35 +0000 | [diff] [blame] | 34 | how Keychain Access makes certificates. |
Johnny Chen | bc92ef0 | 2011-07-20 20:28:36 +0000 | [diff] [blame^] | 35 | [Note: These also apply for Lion.] |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 36 | |
| 37 | - Option-drag the new lldb_codesign certificate from the login keychain to |
| 38 | the System keychain in the Keychains pane of the main Keychain Access window |
| 39 | to make a copy of this certificate in the System keychain. You'll have to |
| 40 | authorize a few more times, set it to be "Always trusted" when asked. |
| 41 | - Switch to the System keychain, and drag the copy of lldb_codesign you just |
| 42 | made there onto the desktop. |
| 43 | - Switch to Terminal, and run the following: |
| 44 | |
| 45 | sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/lldb_codesign.cer |
| 46 | |
Greg Clayton | 26923fe | 2010-12-14 23:19:04 +0000 | [diff] [blame] | 47 | - Right click on the "lldb_codesign" certificate in the "System" keychain (NOT |
| 48 | "login", but the one in "System"), and select "Delete" to delete it from |
| 49 | the "System" keychain. |
| 50 | - Reboot |
| 51 | - Clean and rebuild lldb and you should be able to debug. |
| 52 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 53 | That should do it. |