<div dir="ltr">Roman,<div><br></div><div>I've run your code with the initialization of the local variable part added to it. It looks like that depending on the bytecode viewer I get different bytecode. When I use javap -c Decomp.class I get the following (what you get):</div><div><br></div><div>Compiled from "Decomp.java"</div><div>public class decomp.Decomp {</div><div> public decomp.Decomp();</div><div> Code:</div><div> 0: aload_0 </div><div> 1: invokespecial #1 // Method java/lang/Object."<init>":()V</div><div> 4: return </div><div> 5: iconst_0 </div><div> 6: istore_0 </div><div> 7: iinc_w #0, 1 // #0</div><div><br></div><div> public static void main(java.lang.String[]);</div><div> Code:</div><div> 0: return </div><div> 1: iconst_0 </div><div> 2: istore_0 </div><div> 3: iinc_w #0, 1 // #0</div><div>}</div><div><br></div>However, when I use Eclipse's bytecode viewer I get the following:<div><br>// Compiled from Decomp.java (version 1.2 : 46.0, super bit)<br>public class decomp.Decomp {<br> // Method descriptor #12 ()V<br> // Stack: 1, Locals: 1<br> public Decomp();<br> 0 aload_0 [this]<br> 1 invokespecial java.lang.Object() [1]<br> 4 return<br> 5 wide<br> 6 iinc 0 500 [this]<br> Line numbers:<br> [pc: 0, line: 0]<br> [pc: 1, line: 1]<br> [pc: 4, line: 2]<br> [pc: 5, line: 3]<br> Attribute: LineNumberTable Length: 18<br> Attribute: LineNumberTable Length: 18<br><br> // Method descriptor #11 ([Ljava/lang/String;)V<br> // Stack: 0, Locals: 1<br> public static void main(java.lang.String[] arg0);<br> 0 return<br> 1 wide<br> 2 iinc 0 500 [arg0]<br> Line numbers:<br> [pc: 0, line: 0]<br> [pc: 1, line: 1]<br> Attribute: LineNumberTable Length: 10<br> Attribute: LineNumberTable Length: 10<br>}</div><div><br></div><div>Which is correct. So, apparently the wide incremental instruction, i.e., iinc_w should be interpreted a bit different than its regular version iinc. I'm not a bytecode specialist, so I cannot tell exactly how to interpret iinc_w's arguments in terms of iinc.</div><div><br></div><div>In general bytecode can be quite confusing, so in order to check whether your instrumentation works as expected try to print something out like the value of the local variable you're trying to increment. Thus when you execute the instrumented code you will know for sure if this is what you want or not, or there are any errors in the instrumentation.</div><div><br></div><div>Hope it helps.</div><div><br></div><div>Elena</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 11:38 AM, Roman Petriev <span dir="ltr"><<a href="mailto:vvpiroman@gmail.com" target="_blank">vvpiroman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Test cases <a href="https://dl.dropboxusercontent.com/u/67534750/TestCases.rar" target="_blank">here</a>.<div>Is it good? Do you need anything else?</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-02-05 12:58 GMT+03:00 Bodden, Eric <span dir="ltr"><<a href="mailto:eric.bodden@sit.fraunhofer.de" target="_blank">eric.bodden@sit.fraunhofer.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Roman.<br>
<span><br>
> I hope that is (exactly) what you want to see.<br>
<br>
</span>Ideal would be a minimal but runnable example, including your driver class for Soot and the command-line options you are using. We should be able to reproduce this with as little effort as possible.<br>
<br>
Thanks,<br>
Eric<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>