[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finding max stack height and number of locals



Hello!

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?

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.

Alternatively, we've been trying to put coffi to work, without Soot. We
tried to make coffi load a class (went all right, it seems) and then
extract the needed information by traversing all the methods in the
loaded class. This, however, was easier said than done - we've been
totally unable to get to any methods. Does anybody on this list have any
experience with coffi?

If anybody can help us, we will appreciate it a lot. Thanks in advance!

-- 
Ole Friis Østergaard <olef@daimi.au.dk>
  For unge til at føle ansvaret tynge
  som andet end dårlig samvittighed
  (Steffen Brandt)