And of course "Also remember that it would be dangerous to call the function from the debugger (outside the normal flow of the application). This can modify the state of the application (a function may change other objects)" cannot be solved by any debugger (even if you'd take a complete snapshot to restore afterwards or did that in a forked version of the process, I/O related things could still change the state in a non-reversible/sandboxed way).
Here the "pure" attribute That gdb/DWARF should be aware of might help. Of course FPC would need to set this attribute automatically if the function in fact is "pure".

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to