[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding max stack height and number of locals
I've added Clark Verbrugge, the author of Coffi, to the CC list of this
email.
On Thu, 18 Oct 2001, Ole Friis Ostergaard wrote:
> Does anybody know how to find the maximum stack height and the number of
> local variables for a method, as specified in the .class file?
Soot does not preserve information about the initial classfile; it is,
after all, quite difficult to analyze. If you really want to deal with
the classfile, you can use Coffi directly. Clark Verbrugge's web page is
at
http://www.sable.mcgill.ca/~clump/
and if you follow the research link, you'll be able to download an
un-Sootified version of Coffi.
Soot does have the Baf intermediate representation, which is
bytecode-like, but doesn't have evil representation issues. I believe
that the maximum stack height gets computed from the Baf code.
> I need this information, and it seems that coffi retrieves this
> information during the loading of a class in ClassFile.java (line 639
> and 640 - ca.max_stack and ca.max_locals), but I (and a couple of other
> guys) cannot see if this information is thrown away by Soot, or if it is
> actually possible to retrieve it somehow.
This is not a supported Soot interface. We do not recommend that you try
to access the Coffi libraries used by Soot as a backend.
pat