Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
364 views
in Technique[技术] by (71.8m points)

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

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# Console Application in VS2010 for .NET 4.0, the default target settings for the project is to target the x86 platform instead of Any CPU (MSIL) like Visual Studio 2008 does

[...]

Adding true support for EnC to the 64-bit CLR is unfortunately a large work item and other features were prioritized over this given the work around of changing the platform target to x86.

(from http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=455103)

The description on Microsoft Connect makes it appear as though 64-bit Edit and Continue is a major architectural change. My question is: what is different about x64 that makes EnC difficult?

I haven't been able to find much in the way of technical detail on the web, other than "64-bit EnC doesn't work".

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...