[Mono-dev] [PATCH] mono debugger for Mac OS X

jonas echterhoff jonas at unity3d.com
Thu Apr 16 11:53:11 EDT 2009


I attached two diff files (one for the debugger module, one for the  
mono module itself), which implement the mono debugger for Mac OS X. I  
have never submitted a patch for mono before, so if there's anything  
else I need to do, let me know.

This lets you use mdb to debug mono programs on Mac OS X, as you would  
in Linux. It is probably very unstable. Some known issues:

-Currently, you can only debug the main thread of an executable.
-It will not always gracefully exit after the debugged executable  
terminates
-Watchpoints don't work yet.

Mac OS X Leopard (which is required to run this) has a security  
mechanism to determine which processes are allowed to access other  
processes memory/register states. This works by signing the executable  
with a trusted certificate. So, in order to use this, you will have to  
create a certificate for code signing, as described here:

http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#/ 
/apple_ref/doc/uid/TP40005929-CH4-SW1

Choose "Get Info" for the newly created certificate in Keychain  
Access.app, and under "Trust", set "Code Signing" to "Always Trust".  
Now, sign the mono executable you built with the patch using:

codesign -v -s "NAME_OF_CERTIFICATE" $YOUR_MONO_INSTALL_DIRECTORY/bin/ 
mono

Let me know if there are any questions,
jonas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: debugger.diff
Type: application/octet-stream
Size: 48725 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090416/1a2826c2/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.diff
Type: application/octet-stream
Size: 7927 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090416/1a2826c2/attachment-0003.obj 


More information about the Mono-devel-list mailing list