[Mono-dev] Conflict between Mono.Debugger.Soft and .NET

Virgile Bello virgile.bello at gmail.com
Fri Dec 3 22:53:41 EST 2010


Hello,

I am embedding Mono VM from C++ using mono runtime API, and using
Mono.Debugger.Soft to debug the code running inside the VM (for scripting
purpose).
I managed to make it work well (I receive TypeLoad & MethodEntry events from
debugger).

However, I tried to embed this C++ code inside a .NET application through
P/Invoke to make some tools with UI (layers are .NET/UI ==(pinvoke)==> C++
engine ==(mono VM)==> Mono scripting). In that configuration, the
application crash as soon as it tries to run some VM code that should
trigger a breakpoint/MethodEntry event, i.e. running a constructor (the
debugger connect, and I receive AssemblyLoad and TypeLoad event before it
crashes). Log shows everything is fine but suddenly stop at the time
breakpoint is supposed to be caught.

I suppose this is due to a conflict about how Mono try to catch the
breakpoint (using interrupt or something like that) and the .NET layer which
probably try to catch those events as well for internal reasons (failure
detection, or to transmit some other information maybe).
I was wondering if someone could think of a way to make .NET runtime not
conflict with Mono debug breakpoints.

Also, just so you know, Mono.Debugger.Soft.dll shipped with Mono 2.8.1
Windows doesn't work, I had to either recompile it or get the one from
MonoDevelop.

Virgile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20101204/1a934a90/attachment.html 


More information about the Mono-devel-list mailing list