[kaffe] Cygwin status update
Dalibor Topic
robilad at kaffe.org
Fri Dec 19 12:14:02 PST 2003
Hi Jim,
Jim Pick wrote:
> 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.
done.
>>It doesn't fully work, as the kjc step to build rt,jar crashes.
>
>
> I don't think that step ever worked.
>
It did, that's the funny bit. I assume the crash is due to me not
implementing the signal handling bit, I'll look at it during the weekend.
>>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.
>
I've got bad news. The byte flipping happens before main is called at
all. This will be a hard bug to shoot down.
> Valgrind is what you want!
>
> http://valgrind.kde.org/
>
> It'll tell you exactly where to look, usually.
Ah, yes. But there is no cygwin port afaik :( But maybe I can try other
memory checkers (dmalloc, efence) if they have been ported to Cygwin.
> 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?
I think the 'cygwin on wine' project hasn't got very far ;)
cheers,
dalibor topic
More information about the kaffe
mailing list