Why doesn't Edit and Continue work on the x64 CLR?

前端 未结 3 765
孤街浪徒
孤街浪徒 2020-12-09 07:48

Microsoft have explained that they won\'t be supporting Edit and Continue under the x64 CLR in Visual Studio 2010:

When creating a new Visual C# Conso

相关标签:
3条回答
  • 2020-12-09 08:32

    Edit and Continue requires that the compiler patches a running executable. This is typically done by replacing all altered functions. Obviously, the JITted versions thereof have to be discarded as well, and callers adjusted to possibly new locations.

    This isn't especially difficult for x64, probably about as hard as on x86. But unlike x86, this simply hasn't been done for x64 yet. And the differences between x86 and x64 are big enough that you can't simply take the x86 EnC code and change every 4 in an 8.

    0 讨论(0)
  • 2020-12-09 08:36

    Seems like new .NET framework supports this. From details section of .NET Framework 4.5.1 Preview

    The .NET Framework 4.5.1 Preview ... includes these significant ... enhancements:

    ...
    64-bit Edit and Continue
    ...

    Still doesn't work in Visual Studio 2012 with .NET 4.5.1 Preview installed.

    0 讨论(0)
  • 2020-12-09 08:46

    This blog post expands on what MSalters said: http://blogs.msdn.com/rmbyers/archive/2009/06/08/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx

    Basically, Microsoft is more interested in improving the x86 debugging tools (e.g. Intellitrace) than it is in improving the x64 debugging tools. This is quite worrying since it seems like Intellitrace will also have to be ported to x64 at some point, which will likely further delay improvements to x64 debugging.

    0 讨论(0)
提交回复
热议问题