classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] make libjawt binary-compatible with Sun's implementatio


From: Mark Wielaard
Subject: Re: [cp-patches] make libjawt binary-compatible with Sun's implementation
Date: Mon, 22 Aug 2005 14:24:46 +0200

Hi,

On Sat, 2005-08-20 at 19:19 -0400, Thomas Fitzsimmons wrote:
> I tested this with our JAWT demo; libDemoJAWT.so can be built
> and run interchangeably between JamVM and the JDK.

How exactly do I compile and run the example?

The .java file is in the package gnu.classpath.examples.jawt but the .c
native function does not reflect that. It seems the following patch is
needed:

-Java_DemoJAWT_paint (JNIEnv* env, jobject canvas, jobject graphics)
+Java_gnu_classpath_examples_jawt_DemoJAWT_paint (JNIEnv* env,
+                                                jobject canvas,
+                                                jobject graphics)

Next I am unsure what to link it against now. We have a library called
jawtgnu, but not one called jawt. Should we have/symlink one?

Finally when running it (linked to jawtgnu) I get a crash with the
following gdb backtrace:

#0  0x08060254 in env ()
#1  0xae0ae7aa in Java_gnu_classpath_examples_jawt_DemoJAWT_paint (
    env=0x8060254, canvas=0xafea4b28, graphics=0xb0018bc0) at DemoJAWT.c:59
#2  0x0805cade in callJNIMethod (env=0x8060254, class=0x0,
    sig=0x80d98f8 "(Ljava/awt/Graphics;)V", ret_type=0, ostack=0x82db1a0,
    f=0xae0ae72c 
"U\211\uffffWVS\203\uffffl\uffffE\uffffp\uffff\n\uffff\uffffE\uffff\003", 
args=2) at dll_md.c:64
#3  0x0804ea44 in callJNIWrapper (class=0x0, mb=0x8172730, ostack=0x82db1a0)
    at dll.c:328
#4  0x0805168d in executeJava () at interp.c:2236
#5  0x0804f63c in executeMethodVaList (ob=Variable "ob" is not available.
) at execute.c:66
#6  0x0804f6de in executeMethodArgs (ob=0xafff75c8, class=0xafff70e0,
    mb=0x82d6a10) at execute.c:38
#7  0x0805a60d in threadStart (arg=0x82d8498) at thread.c:257
#8  0xb7fc8ccd in start_thread () from /lib/tls/libpthread.so.0
#9  0xb7f1db0e in clone () from /lib/tls/libc.so.6

But I cannot figure out where the env () method comes from.

Thanks,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]