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

2012-08-11 Thread Rainer Stratmann
The code below finds all caller adresses in a program to a known procedure/function adress. With this I can get all caller adresses to the translate function. Moreover - with another piece of code (not shown here) I got also the text snippets itself, because they are loaded immediately before

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 13:40:44 schrieb Rainer Stratmann: procedure i_realy_know_what_i_am_doing( p_opcode : pbyte ; count : longint ; proc_adr : pointer ); Better: i_really_know_what_i_am_doing ___ fpc-pascal maillist -

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Martin
On 11/08/2012 12:48, Rainer Stratmann wrote: Am Saturday 11 August 2012 13:40:44 schrieb Rainer Stratmann: procedure i_realy_know_what_i_am_doing( p_opcode : pbyte ; count : longint ; proc_adr : pointer ); Better: i_really_know_what_i_am_doing You have read the long discussion thread, about

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 13:52:58 schrieb Martin: On 11/08/2012 12:48, Rainer Stratmann wrote: Am Saturday 11 August 2012 13:40:44 schrieb Rainer Stratmann: procedure i_realy_know_what_i_am_doing( p_opcode : pbyte ; count : longint ; proc_adr : pointer ); Better:

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Martin
On 11/08/2012 13:00, Rainer Stratmann wrote: Am Saturday 11 August 2012 13:52:58 schrieb Martin: On 11/08/2012 12:48, Rainer Stratmann wrote: Am Saturday 11 August 2012 13:40:44 schrieb Rainer Stratmann: procedure i_realy_know_what_i_am_doing( p_opcode : pbyte ; count : longint ; proc_adr :

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 14:15:11 schrieb Martin: I do not read all discussions. Which exactly headline has it? Does it affect the possibility to get the information I want? Re: [fpc-devel] Re: Class field reordering The searched procedure/function is not a class procedure or function.

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Martin
On 11/08/2012 13:32, Rainer Stratmann wrote: Am Saturday 11 August 2012 14:15:11 schrieb Martin: If that changes, then your code fails. I can easily adopt the code then. There are not many different ways for a call. http://css.csail.mit.edu/6.858/2011/readings/i386/CALL.htm Yes, so the

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 14:46:53 schrieb Martin: On 11/08/2012 13:32, Rainer Stratmann wrote: Am Saturday 11 August 2012 14:15:11 schrieb Martin: If that changes, then your code fails. I can easily adopt the code then. There are not many different ways for a call.

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Marco van de Voort
In our previous episode, Rainer Stratmann said: There are not many different ways for a call. http://css.csail.mit.edu/6.858/2011/readings/i386/CALL.htm Yes, so the amount of effort may increase drastically. New CPU may bring new ways too. But not the 80x86 CPU. It is still the

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Jorge Aldo G. de F. Junior
Sorry for posting without bringing a solution, but i am curious, why do you need this ? Doesnt sound like good programming practice... 2012/8/11 Marco van de Voort mar...@stack.nl: In our previous episode, Rainer Stratmann said: There are not many different ways for a call.

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 17:34:44 schrieb Marco van de Voort: In our previous episode, Rainer Stratmann said: But not the 80x86 CPU. It is still the same opcode for a call ($E8). Maybe not the call, but changing or adding address encoding is quite realistic. I assume you tested your code

Re: [fpc-pascal] Get all caller adresses of a given function/procedure before executing

2012-08-11 Thread Rainer Stratmann
Am Saturday 11 August 2012 19:18:39 schrieb Jorge Aldo G. de F. Junior: Sorry for posting without bringing a solution, but i am curious, why do you need this ? Doesnt sound like good programming practice... See Thread: Get all caller adresses of a given function/procedure before executing We