CBFalconer wrote:
Frank Heckenbach wrote:
... snip ...
It's a kludge. I think it would work, but I wouldn't like to keep it permanently ... ;-)
You could arrange that the standard procedure new returns NIL for failure, and that the compiler generates all calls with a following "if p = NIL THEN trap;". This would duplicate the standard specified action, but allow for a compile time switch (or pseudo comment) to inhibit the trap action generation. Then the user can install whatever action he desires.
OTOH, it produces more runtime code.
It also makes it easy for the normal trap action to report file:linenumber data.
Yes, but we can also get this information via a backtrace and addr2line, so that's not the most important thing. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8