[Soot-list] Detecting Synthetic Class Members
Devin Mahoney
devin.mahoney at kyrus-tech.com
Wed Nov 7 10:04:07 EST 2012
What's the best way to enhance support in soot for synthetic class
members?
I've been having some trouble examining classes in Soot that have
Synthetic methods and fields. I realize that there are two ways to
specify a member as synthetic in a class file, through the Synthetic
attribute and through the access flag. [1] It appears that Soot/coffi
only supports the attribute and not the access flag. The class file
spec [2] shows how to set the access_flags to indicate a synthetic
property.
In order to even read this access_flags property, the coffi.ClassFile
would need to define and support ACC_SYNTHETIC, probably here: [3].
Would it make more sense to then add an additional constant to
soot.Modifier [4], or simply detect when that flag was set and in turn
set the Sythentic tag?
Thanks,
Devin Mahoney
[1]
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.8
[2]
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.1-200-E.1
[3]
https://github.com/Sable/soot/blob/master/src/soot/coffi/ClassFile.java#L69
[4] https://github.com/Sable/soot/blob/master/src/soot/Modifier.java#L56
More information about the Soot-list
mailing list