[Mono-list] Embedding strategy

Robert Jordan robertj at gmx.net
Fri Sep 19 13:22:51 EDT 2008


Mads Bondo Dydensborg wrote:
> For b is the the fact that PInvoke is quite well documented, and that I know 
> exactly how to provide a threadsafe environment from C++. But I would 
> probably have to use the mono debugger. 

You can still use gdb. Set up gdb as described here:

http://www.mono-project.com/Debugging#Debugging_with_GDB

Then insert a breakpoint instruction using
System.Diagnostics.Debugger.Break () just before the p/invoke
call you want to debug and launch mono with gdb.

When the breakpoint is reached you should be able to break
into the native function by setting another breakpoint with
gdb ("b functioname") and continue ("c").

Another way is to insert a breakpoint instruction into your
native library (e.g. using G_BREAKPOINT (), if you're using
GLib).

Robert



More information about the Mono-list mailing list