<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 28 Feb 2012, at 14:36, Lukasz Sokol wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 28/02/2012 10:45, Jonas Maebe wrote:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Apple supported that in older versions of their development tools,</blockquote><blockquote type="cite">and it worked as well (or as badly) with FPC as it did with GCC. It<br></blockquote><blockquote type="cite">required changes to their dynamic linker (for the code replacement)<br></blockquote><blockquote type="cite">and to GDB. It was extremely flakey and limited though, and they<br></blockquote><blockquote type="cite">abandoned it fairly quickly.<br></blockquote><font class="Apple-style-span" color="#006312"><br></font>(Un)fortunately I don't know much about the internals, as I mentioned :)<br><br>The closest idea that looks similar is a loadable library: you can unload a dll <br>(or a .so), edit/recompile/rebuild it while the caller program is paused/waiting,<br>then reload it (with an obvious constraint that you can't modify the interfaces<br>that the already-running program knows)<br> - now imagine each code/data block is separate 'object' that can be loaded/unloaded...?<br></div></blockquote><div><br></div><div>That is basically what Apple did. But if you want to do that at a reasonable speed and with support for e.g. existing addresses in memory (someone may have taken the address of a routine you are about to replace, and if the new code is larger it may get stored somewhere else), then you need lots of extra support (e.g. via trampolines for code; for data it's even harder). Not to mention that your debugger has to be able to deal with code changing addresses all the time and debug info changing.</div><div><br></div><div>In the end, people spent more time debugging the inconsistencies and limitations of "fix and continue" than it helped them. Maybe Microsoft's implementation is better, but</div><div>a) it is extremely hard to get right</div><div>b) as mentioned, it cannot be implemented in FPC itself; it mainly requires support from a lot of other things (and if that support is in place and requires some help from the compiler, then we can talk about making FPC support such an environment)</div></div><br><div><br></div><div>Jonas</div></body></html>