On 27 Feb 2012, at 13:32, Lukasz Sokol wrote:

On 26/02/2012 11:17, Mattias Gaertner wrote:
The next step is to "compile" the function on every change. Easy with
an interpreter. How to compile only one function of a big program and
insert/replace it?

Sorry for a plug, but MS VC++ 6.0 (!)* allowed for Pause->Edit Code->
Quick compile->Resume Execution kind of workflow...

Yes, in Debug/Pause mode, you COULD write a {code block} and then go
Debug->Apply and Continue (or something like that) and voila,
you could totally change code paths ...
(Not that I know much about internals/constraints of this, to be honest,
but of all, i found that a very cool feature)

Is there a way to add THAT to FPC/Lazarus/GDB world ?

Apple supported that in older versions of their development tools, and it worked as well (or as badly) with FPC as it did with GCC. It required changes to their dynamic linker (for the code replacement) and to GDB. It was extremely flakey and limited though, and they abandoned it fairly quickly.

Since the required support is generally not part of the compiler but of the environment (you need a way to inject the new code, and possibly data, into the process, and link up everything with the new version), I don't think this is something that can be added as an "FPC" feature.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to