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

Martin lazarus at mfriebe.de
Mon Aug 6 22:17:11 CEST 2012


On 06/08/2012 20:18, Rainer Stratmann wrote:
> I do not understand this ...
> What is the content of the stack?
> Which file 'f'?
> Is it read from or write to file 'f'?
>

f is just the STDOUT or logfile where the list of addresses is written 
to. You would likely use an array instead...

But let me say: I am with everyone else. Using stack/caller info is the 
wrong(est) way.

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).



More information about the fpc-pascal mailing list