[fpc-pascal] Get all caller adresses of a procedure/function

Rainer Stratmann RainerStratmann at t-online.de
Mon Aug 6 22:39:58 CEST 2012


Am Monday 06 August 2012 22:17:11 schrieb Martin:
> But let me say: I am with everyone else. Using stack/caller info is the
> wrong(est) way.
I fully agree.
> And if you need to ask "What is the content of the stack?" Then you
> should not use it.
> All this functions are very low level. Usinc this kind of data implies
> having a very good understanding of the way the stack is organized.


> Why do you not keep al ist of all the snippets you have seen (keep a
> copy of the text (strings are copy on write, so you do not need a real
> copy, just a 2nd string of the same text).

Can you explain it more?
I want not search through the sourcecode, because it makes it less easy.


All I need is all caller adresses of p1 in the program.
Or an incremented counter at compiletime.
Both seems impossible by now.

If p1 is called then I can see which snippet was not yet called.
If the compilerincremented counter at the end is 500, then I need 500 snippet 
entries and I can see which entry already was called by the program during 
execution.



More information about the fpc-pascal mailing list