I just updated to fpc trunk 45658

It seems sometime in the last 3 or 4 month a change was made that leads to "parentfp" being optimized away.
Even with -O- or -O1 (many users do O1 for debugging)

This happens if the nested proc does not access data in the outer procedure. So the code indeed does not need it. But a user debugging the code may well want to see the content of those vars.

There still is dwarf info, though it points to some register (I have seen rax and rdx). While normally it would point to an offset in the current frame, where the outer frame is stored.

I think fpc should keep the parentfp for debugging (in O1)?
If agreed, I report a bug.
If not agreed what alternatives are proposed?


Or ideally (but that would also need the parentfp's value) provide dwarf entries for each of outer variable that is in scope, using location expressions to directly point to the date.

Regards
Martin
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to