[Soot-list] How to retrieve compile-time constant name

Mian Wan mianwan at usc.edu
Mon Jul 20 19:07:05 EDT 2015


Hi, I'm trying to retrieve the compile-time constant name (e.g. public
static final int main = 2130903040) for Android apps. However, Java
compiler will replace all the statement used this
compile-time constant with its actual value. Thus, in bytecode, the
constant seems in the Constant Pool.
But in Jimple code, I can see some code for method <clinit> to do
initialization for this constant, in which the constant name is preserved.
When I loaded this app to see all methods for this class, this <clinit>
method doesn't exist in the class file.

Can you help me about explain why this happened and how to obtain the
constant name?

Thanks,

-- 
Best,

Mian Wan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150720/c85eb2c1/attachment.html 


More information about the Soot-list mailing list