[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I create a SootClass object from a byte code array?
>>>>> "natebox" == nathan gulley <natebox@yahoo.com> writes:
natebox> Is there any way to create a SootClass object from a
natebox> byte code array?
I believe that the part of Soot which reads byte code arrays is
the loop in soot.coffi.ClassFile.parseMethod() which repeatedly
calls soot.coffi.ByteCode.disassemble_bytecode(). (I found out
about this while diagnosing the Exceptions that resulted from
trying to process a class file which included wide dloads and
dstores; at the time, ByteCode.disassemble_bytecode()
didn't know about wide dloads and dstores).
If I'm right, then Soot doesn't provide an API hook for turning
an arbitrary code array into a Body, but following
coffi.ClassFile.parseMethod()'s example might let you do the job
yourself.
--
John Jorgensen jjorge1@cs.mcgill.ca