How to add type information for const and const-wide instructions

44 views
Skip to first unread message

Xiangyang Guo

unread,
Sep 14, 2015, 9:28:48 PM9/14/15
to apktool
Hi,

I notice that apktool's smali code doesn't contain the type information about the const and const-wide information. Then it's not that clear what type of variables are transmitted to this register. Can anyone guide me how to add the type information for const and const-wide instructions? For example, "const/4 v0, 0x0" can be changed to "const/4 v0, 0x0 #int"?

Thanks in advance. 

Xiangyang

Ryszard Wiśniewski

unread,
Sep 15, 2015, 3:58:46 PM9/15/15
to apk...@googlegroups.com
Hi, there is no type information at the bytecode level. Technically null, false, 0, etc. is the same value - zero value. Thus single register defined as e.g. "const v0, 0x12345678" can be used in several places as different types.
 


--
You received this message because you are subscribed to the Google Groups "apktool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apktool+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages