crosire / blink

A tool which allows you to edit source code of any MSVC C++ project live at runtime
BSD 2-Clause "Simplified" License
1.09k stars 80 forks source link

comparison with "edit and continue" #18

Open Trass3r opened 5 years ago

Trass3r commented 5 years ago

How does it compare to /ZI? Implementation details, performance, limitations. Would be good to add that to the readme.

Trass3r commented 5 years ago

About EnC limitations: https://blogs.msdn.microsoft.com/vcblog/2016/07/01/c-edit-and-continue-in-visual-studio-2015-update-3/

Requires /Gy + /INCREMENTAL and is incompatible with /OPT:* and custom compilers.

crosire commented 5 years ago

Technically blink makes use of a lot of the information provided by /ZI. So there are silimarities. But this projected started back when EnC was still much more limited (it improved a lot in the last couple of years). I haven't compared in a while. On the points you mentioned: blink doesn't need /Gm or /INCREMENTAL. It also works with optimizations enabled (although this could potentially cause some weird behavior because of inlining). blink will attempt to use whatever compiler was used to compile the target application. If it fails to detect that it will instead fall back to executing the first cl.exe that is in PATH.

Trass3r commented 5 years ago

I guess it's still true that EnC uses extra padding to replace functions "in-place" in contrast to your approach of putting them in new memory and redirecting the old ones?