[Mono-dev] Re: Edit and Continue

David Srbecky dsrbecky at gmail.com
Wed Aug 10 15:55:45 EDT 2005

Anyone please?

Regarding the Atsushi Eno's comment about legality of using the 
Microsoft's metadata format: I do not think it is a problem since:
1) The specification is going to be released soon anyway
2) We do not really need it anyway - Mono's own format can be used.

David Srbecky

David Srbecky wrote:
> Hello,
> My name is David Srbecky and I am working on SharpDevelop 2.0 debugger.
> The debugger is getting nearly finished, but it is still missing one
> 'cool' feature - edit and continue. The support for Edit and Continue
> (EnC) from the side of Microsoft runtime is good enough, but there is no
> support at all from the compiler side - all the functionality is private
> and mostly part of VS. This effectively means that to support EnC, I
> must write my own compiler. I would never try to that, but fortunately
> there is mono to save the day. I would like to use the mono compiler to
> produce the necessary deltas, which I must feed to MS runtime. The
> problem is the I know neither the internals of mono compiler nor the
> internals of System.Reflection.Emit and implementing support of EnC
> would be a tedious or impossible task for me.
> I have already contacted Marek Safar and after some long discussions we
> have concluded that it might be technically possible.
> .NET Framework 2.0 really does not support many 'edits' - adding private
> methods/fields to classes and modifying bodies of existing methods more
> or less sum it up and I would like to make work only the second one.
> All I need is probably just one function 'RecompileFunction' in the mono
> compiler, which would be used like that:
> Driver.Main(new string[] {"MyProgram.cs"});
> // I run the program
> byte[] deltaIL, deltaMetadata;
> Driver.RecompileFunction(
>                           "MyClass.MyMethod",    // Function name
>                           "return \"Hello\"; ",  // New body of function
>                           out deltaIL,           // Produced IL code
>                           out deltaMetadata      // Changed metadata
>                           );
> // I send the deltas to the runtime
> The deltaIL is really nothing more then just the IL code of the compiled
> function. deltaMetadata is a bit more complicated but it seems to me
> that it has the same format as metadata saved in an assembly.
> We had *long* discussions with Marek relating to that mono compiler will
> not run on MS runtime and SharpDevelop will not run on mono runtime, but
> I think we got the solution: everyone runs in its own runtime and .NET
> Remoting connects the programs. I have written a little "Hello,
> compiler!" application and it seems to work.
> Are there any developers that are willing to help me please?
> Regards,
> David Srbecky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050810/4eae2ca4/attachment.bin 

More information about the Mono-devel-list mailing list