[kaffe] Cygwin status update

Jim Pick jim at kaffe.org
Tue Dec 16 08:20:03 PST 2003


On Tue, 16 Dec 2003 00:57:44 +0100
Dalibor Topic <robilad at kaffe.org> wrote:

> hi all,
> 
> I've been playing with Cygwin & kaffe last week, and I've got patches to 
> gradually merge in, that let kaffe build again as a static binary.

Excellent.

> It doesn't fully work, as the kjc step to build rt,jar crashes. 

I don't think that step ever worked.

> Investigation about it shows me that the old findJarFile bug still 
> strikes on Cygwin. This time I was able to figure out a little more, though.
> 
> The problem seems to be that the first few bytes of the findJarFile 
> function in kaffe/kaffevm/jar.c somehow get overwritten. I've tried to 
> debug it with awatch in GDB, but didn't suceed in catching the 
> overwriting happen. So I'd be glad to hear tips & tricks on dealing with 
> that type of bugs from other developers.

Valgrind is what you want!

  http://valgrind.kde.org/

It'll tell you exactly where to look, usually.

I did get it to run Kaffe interpreter x86 binaries on Linux.

Using it with the JIT is a problem because Valgrind needs to be
explicitly informed about self-modifying code (because it is an
x86-to-x86 JIT itself).  There is a way to add "hints" to the
code to help Valgrind do the right thing, but I didn't figure
that out yet.

For cygwin, some people have managed to get valgrind to run wine, so
it's possible to run it against Windows binaries that work with wine. 
Scary, huh?

Cheers,

 - Jim
 






More information about the kaffe mailing list