[kaffe] Debugging

Michael Franz mvfranz at gmail.com
Mon Nov 22 20:52:14 PST 2004


I was told that this is because the compiler optimzes the instructions
into a different order.  This can be over-come by changing the CFLAGS
in config.frag to include -O0


On Mon, 22 Nov 2004 19:59:25 -0800 (PST), Pinaki Mukherjee
<pinaki2003 at yahoo.com> wrote:
> 
> Hi, 
>   
> I am trying to step through the JVM instructions in a simple program. I
> start stepping through from the beginning and note the following order of
> instructions getting executed: NEW, DUP, INVOKESPECIAL, ALOAD_n. At this
> point, I am inside kaffe.def (the debugger just shows the file name and line
> number here). Now all of a sudden, from inside the ALOAD_n block in
> kaffe.def, the control jumps to GETSTATIC (instead of going back to
> runVirtualMachine) and then to JSR_W. I am not understanding it. How can
> this happen?
>  
> Thanks, 
> Pinaki
> 
>  
>   
> 
> Pinaki Mukherjee <pinaki2003 at yahoo.com> wrote: 
>  
> Please, can somenody answer this one... 
>   
> Thanks. 
> 
> 
> Pinaki Mukherjee <pinaki2003 at yahoo.com> wrote: 
>  
> Hi, 
>   
> I modified kaffe.def for each instruction and want to test whether they are
> correct. I want to step through each JVM instruction that is executed in
> Kaffe. I think this consists of instructions for VM creation, the actual
> application execution and the VM destruction. How do I do this? 
>   
> I tried the following: 
> 1. First put a breakpoint in the function runVirtualMachine and then run.
> After the breakpoint is hit, it will run the instructions for VM creation
> until function main2 is hit (is that right?). But I do not have a list of
> the instructions executed for VM creation, so this is difficult. 
> 2. I put a breakpoint in main2 and ran upto this point. After that, I put a
> breakpoint in runVirtualMachine. I think after this point the VM will
> execute instructions from the actual application. But when I step inside
> kaffe.def, the first instruction executed (LDC1) is different from the first
> instruction in main (ALOAD_0). I don't understand why this is happening. 
>   
> Thank you. 
>   
> Pinaki 
> 
>  ________________________________
>  Do you Yahoo!?
> The all-new My Yahoo! – Get yours free!
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
> 
> 
>  
> 
>  ________________________________
>  Do you Yahoo!?
> The all-new My Yahoo! – Get yours free! 
> 
> 
> 
>  ________________________________
> Do you Yahoo!?
>  Discover all that's new in My Yahoo! 
> 
> 
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
> 
> 
>




More information about the kaffe mailing list