This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to know the DEF operand that corresponds to a specificargument of a call to function?
- From: Davide Pozza <davide dot pozza77 at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 19 May 2005 19:02:08 +0200
- Subject: Re: How to know the DEF operand that corresponds to a specificargument of a call to function?
- Reply-to: Davide Pozza <davide dot pozza77 at gmail dot com>
I'm trying to match up call arguments with *_DEF's.
My aim is to build a taint analysis engine to track (along the code)
what variables are under user control (i.e. to track user input
variables obtained by means of functions along the code).
For example, in the case of an fgets, the first parameter has to be
marked as tainted and hereafter the engine has to propagate this
information along the code.
Therefore, in order to do this, I need a function that returns the *DEF
variable which corresponds to a specific function argument for marking it as
tainted.
About global variables, I'd like to not considering them, i.e.
by removing them before executing my pass and by restoring them after
my pass.
I'll try to use the suggestions of Diego.
Thanks,
Davide.