<DIV>My understanding is that, for each JVM instruction, one iteration of the loop inside the function runVirtualMachine is executed. Inside this loop, it executes the case block in kaffe.def for that particular instruction. Once the case block finishes execution, control goes back to the loop inside runVirtualMachine and only then the next JVM instruction can execute.</DIV>
<DIV> </DIV>
<DIV>Here I am seeing that while executing inside the block for ALOAD_n, it jumps to the block for GETSTATIC and then JSR_W. I think that even if the instructions GETSTATIC and JSR_W are scheduled by the compiler in this order, even then after executing the case block for ALOAD_n in kaffe.def, it should go back to the loop inside runVirtualMachine and only after that the subsequent instructions can execute. But this is not happening.</DIV>
<DIV> </DIV>
<DIV>I don't know if it's a bug in the debugger. Any explanation?</DIV>
<DIV> </DIV>
<DIV><BR><BR><B><I>Michael Franz <mvfranz@gmail.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">I was told that this is because the compiler optimzes the instructions<BR>into a different order. This can be over-come by changing the CFLAGS<BR>in config.frag to include -O0<BR><BR><BR>On Mon, 22 Nov 2004 19:59:25 -0800 (PST), Pinaki Mukherjee<BR><PINAKI2003@YAHOO.COM>wrote:<BR>> <BR>> Hi, <BR>> <BR>> I am trying to step through the JVM instructions in a simple program. I<BR>> start stepping through from the beginning and note the following order of<BR>> instructions getting executed: NEW, DUP, INVOKESPECIAL, ALOAD_n. At this<BR>> point, I am inside kaffe.def (the debugger just shows the file name and line<BR>> number here). Now all of a sudden, from inside the ALOAD_n block in<BR>> kaffe.def, the control jumps to GETSTATIC (instead of going back to<BR>> runVirtualMachine) and then to JSR_W. I am not understanding it. How can<BR>> this
happen?<BR>> <BR>> Thanks, <BR>> Pinaki<BR>> <BR>> <BR>> <BR>> <BR>> Pinaki Mukherjee <PINAKI2003@YAHOO.COM>wrote: <BR>> <BR>> Please, can somenody answer this one... <BR>> <BR>> Thanks. <BR>> <BR>> <BR>> Pinaki Mukherjee <PINAKI2003@YAHOO.COM>wrote: <BR>> <BR>> Hi, <BR>> <BR>> I modified kaffe.def for each instruction and want to test whether they are<BR>> correct. I want to step through each JVM instruction that is executed in<BR>> Kaffe. I think this consists of instructions for VM creation, the actual<BR>> application execution and the VM destruction. How do I do this? <BR>> <BR>> I tried the following: <BR>> 1. First put a breakpoint in the function runVirtualMachine and then run.<BR>> After the breakpoint is hit, it will run the instructions for VM creation<BR>> until function main2 is hit (is that right?). But I do not have a list of<BR>> the instructions executed for VM creation, so this is
difficult. <BR>> 2. I put a breakpoint in main2 and ran upto this point. After that, I put a<BR>> breakpoint in runVirtualMachine. I think after this point the VM will<BR>> execute instructions from the actual application. But when I step inside<BR>> kaffe.def, the first instruction executed (LDC1) is different from the first<BR>> instruction in main (ALOAD_0). I don't understand why this is happening. <BR>> <BR>> Thank you. <BR>> <BR>> Pinaki <BR>> <BR>> ________________________________<BR>> Do you Yahoo!?<BR>> The all-new My Yahoo! – Get yours free!<BR>> _______________________________________________<BR>> kaffe mailing list<BR>> kaffe@kaffe.org<BR>> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe<BR>> <BR>> <BR>> <BR>> <BR>> ________________________________<BR>> Do you Yahoo!?<BR>> The all-new My Yahoo! – Get yours free! <BR>> <BR>> <BR>> <BR>> ________________________________<BR>> Do you
Yahoo!?<BR>> Discover all that's new in My Yahoo! <BR>> <BR>> <BR>> _______________________________________________<BR>> kaffe mailing list<BR>> kaffe@kaffe.org<BR>> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe<BR>> <BR>> <BR>><BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br>
Meet the <a href="http://my.yahoo.com">all-new My Yahoo!</a> – Try it today!