[Soot-list] How to access/dump the content of a object reference from def box

Jimmy myxlinux at hotmail.com
Wed Apr 9 11:46:43 EDT 2008





Hello,

I wanted to check the content of a reference in def
box, for example, I wanted to dump the content of $r0 in the following
jimple code.
-----------
java.net.URL $r0;

$r0 = new MyClass;
specialinvoke $r0.<MyClass: void <init>()>();
-----------

Currently, I can check the limited information using the following code on the above assignment statement.

List<ValueBox> def_list = st.getDefBoxes();
if(def_list.size() != 0){
   ValueBox vb = def_list.get(0); 
  Value var = vb.getValue();
  Type type = var.getType();
  System.out.println("type = " + type);
}


Can any one help me to dig into $r0 and access all fields in MyClass ?

Thanks.


Jimmy
_________________________________________________________________
Get in touch in an instant. Get Windows Live Messenger now.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_getintouch_042008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20080409/29f1e82a/attachment.htm


More information about the Soot-list mailing list