[Soot-list] Capturing object creation to build heap

Steven Arzt Steven.Arzt at cased.de
Wed Jul 2 11:21:19 EDT 2014


Hi Kenneth,

If you just want to know the types of objects that are instantiated
somewhere in your program, you can simple iterate over all methods in your
program and check whether there is an assignment with a NewExpr on the right
side. If so, get the type from it.

Best regards,
  Steven

-----Ursprüngliche Nachricht-----
Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Kenneth Tapsoba
Gesendet: Mittwoch, 2. Juli 2014 17:10
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Capturing object creation to build heap

Is there a way to capture object creating in a program using SOOT?
For example in the following program I was to be able to know that i am
creating a new class B when I run SOOT. This will allow me to insert into
the heap object b with the value of its fields (x and y).

public class A {
 void process(){
   B b = new B();
   print(b.x);
  }
}

public class B {
  int x;
  int y;
  public B(){}
}

_______________________________________________
Soot-list mailing list
Soot-list at CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list



More information about the Soot-list mailing list