[kaffe] debugging JITted methods

kaffe at jbbrown9.mailshell.com kaffe at jbbrown9.mailshell.com
Fri Mar 12 16:09:02 PST 2004


I am using Kaffe for a research project in school where I am adding a 
bytecode to some .class files. It's a new bytecode and I'm trying to 
make the changes to the JIT to account for the new bytecode, but coming 
across some trouble.

I started out making changes to the interpreter. Mostly, it involved 
copying/pasting INVOKESTATIC in kaffe.def and adding a couple asm(...) 
statements. But, it turns out I need to use the JIT, which is not so 
straightforward. I've been working on it some and think I have an idea 
of how I need to do things differently, but debugging is going to be 
tough. As a rudimentary way of debugging, I have been trying to find a 
way to dump the JITted method so I could look at that, but haven't been 
able to find a good way to do that.

I expect implementing the new code could be done really cleanly (and 
quickly) by someone who really understands how the JIT is implemented. 
I'm just having a tough time figuring that out.

If you can help me out some, I'd really appreciate it. If I get it all 
figured out, I'd be willing to write up some documentation on how I did 
what I'm working on so if/when other people try to do something similar 
they could suffer a little less than me.

About my environment:
My PC is intel/linux
Kaffe is compiled to alpha/digital unix
I'm running the JVM on an alpha simulator on the intel machine
This makes debugging much tougher because if I run gdb I'm debugging the 
simulator, not kaffe. I might be able to run gdb on the simulator, but 
I'd like to avoid trying to set that up unless absolutely necessary. It 
took me long enough to get kaffe running on it.

TIA,
Jeremy




More information about the kaffe mailing list