This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Editing the AST


Hello!
I'm working on my thesis and I'm analysing two possibilities of
implementation.

What I have to to is to add, before each MOV* instruction, a block of
code to start up a routine that traces memory accesses.

First way of doing so is to edit the ELF generated by gcc to do some
code injection. I would write a software to do that.

I was wandering whether it is possible or not to edit the tree build by
gcc, at compilation time, telling something like "if there is a node
containing a mov, add as a parent the node containing a call to such
routine".

I don't know if I was clear enough =)

I've read something on the Internet, but still I haven't found anything
about this...

Thanks a lot in advance for any help!
-- 
Alessandro Pellegrini

Email: alessandro.pellegrini@tin.it
Home Page: http://www.roma132.it
Irc Name: Liuk
Totem: Grillo Sapientone
Linux User #438975


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]