[Mono-dev] Conflict between Mono.Debugger.Soft and .NET
vargaz at gmail.com
Sat Dec 4 04:18:33 EST 2010
Mono uses segmentation fault handling to implement both breakpoints/single
null reference exception handling. MS.NET probably does the same, and the
two can't coexist. If you embed your code inside the MS.NET VM anyway, why
don't you use their vm for running this scripting code instead of mono ?
On Sat, Dec 4, 2010 at 10:01 AM, Virgile Bello <virgile.bello at gmail.com>wrote:
> As code inside both .NET VM is totally separate and won't reference each
> other, is it really a problem?
> So far, I could run code inside the embedded VM without any problem (main
> app is using MS VM for WPF, embedded inside PInvoke code is mono VM for user
> scripts, so code is totally separate, there should be no common DLL), only
> the breakpoint hook was problematic.
> On 2010/12/04, at 15:57, Zoltan Varga <vargaz at gmail.com> wrote:
> You are basically embedding the mono runtime inside the .net runtime,
> this will not work, not just debugging, but other stuff as well.
> On Sat, Dec 4, 2010 at 4:53 AM, Virgile Bello < <virgile.bello at gmail.com>
> virgile.bello at gmail.com> wrote:
>> 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
>> 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
>> Mono-devel-list mailing list
>> <Mono-devel-list at lists.ximian.com>Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list