[Soot-list] Re: Global variables in soot

John Chaitanya Kati johnkati at cse.iitb.ac.in
Fri May 4 13:41:48 EDT 2007


By global variables i meant, which are available to all the methods of the 
class.
class Test
{	static public int a=5;
 	static public void main(String args[])
 	{
 		int b=10,c;
 		c = a*b;
 		add(a,b);
 	}
 	static void add(int i, int j)
 	{
 		i=i+j;
 		a=15;
 	}
}
a is global, b,c are local to main. I want to find out such variables.











On Fri, 4 May 2007, Eric Bodden wrote:

> What's a global variable?
>
> Soot knows variables of type soot.Local. Those are obviously local.
> Then there also are field references, which are obviously field
> references. Are those what you mean by global? (Of course, a local can
> well be assigned a field reference, the same way as it can happen in
> Java code.)
>
> Eric
>
> On 04/05/07, John Chaitanya Kati <johnkati at cse.iitb.ac.in> wrote:
>> Hi,
>>    Is there a way to find out if a variable is global or not in soot ?
>> 
>> --
>> Thanks for any help in advance
>> John Chaitanya
>> 
>
>
>

-- 

Thanks
John Chaitanya
Like a rose trampled on the ground, you took the fall and thought of me...


More information about the Soot-list mailing list