[Soot-list] Declaring fields in jasmin

Eric Bodden eric.bodden at mail.mcgill.ca
Sun Nov 23 14:07:23 EST 2008


>  ldc "Hello World" <-- stack has 1 item
>  putfield helloworld/Str Ljava/lang/String; <- nothing in the stack
>  getfield helloworld/Str Ljava/lang/String; <- 1 item in the stack
>  getstatic java/lang/System/out Ljava/io/PrintStream; <- 2 items in the stack


I think your 2nd instruction should be a putstatic, and the 3rd should
be a getstatic. My guess is that the verifier complains about nothing
being on the stack when seeing the getfield. getfield expects one
operand on the stack which the field will be retrieved from.

Eric
-- 
Eric Bodden
Sable Research Group, McGill University, Montréal, Canada
Got an interesting job offer? http://www.bodden.de/hire-me/


More information about the Soot-list mailing list