[Soot-list] Declaring fields in jasmin

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


BTW, that should be helpful:

http://eduunix.cn/index2/html/java/Oreilly%20-%20Java%20Virtual%20Machine/

Eric

2008/11/23 Eric Bodden <eric.bodden at mail.mcgill.ca>:
>>  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/
>



-- 
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