[Soot-list] About accessing local variables in soot

LuoQingZhou seriousamlqz at yahoo.cn
Fri Oct 2 08:15:01 EDT 2009


Hi guys,
 
I have some questions about accessing local variables in a method.
 
The first one is there a way of instrumentation to get all values of local variables of a method at run time? And then reset those local variables in the next run? Seems impossible cause maybe it will violate the security constraints of JVM, but I'm not sure...
 
The second is, with the option -p jb use-orginal-names, how does soot do when there are two identical local variables in different scope? For example
 
  {
   String a = new String ("a");
   System.out.println(a);
   
  }
  String a = new String ("b");
  System.out.println(a);
 
In this code snippet I use body.getLocals() to see all locals, and there is only one 'a':
 
Local name: a
Local type: java.lang.String
 
(When the second 'a' is changed to another type, it would list all those two 'a')
 
Thanks very much!
 
Qingzhou Luo

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20091002/a860d978/attachment.html 


More information about the Soot-list mailing list