Fwd: Fwd: [kaffe] kaffe compilation under cygwin

Yavor Georgiev yavor.g.georgiev at gmail.com
Tue Oct 9 04:46:55 PDT 2007


Hi Dalibor,

I think I catched where the problem is, or at least where the error appears.
As you advised I set a break point in the external.c file, I assumed
that loadNativeLibrary is the best place to do it.
I tracked as the VM did some guesses on javanio library's location and
when it tried the "correct" location
"/usr/local/classpath/lib/classpath/" I steped into the function.
The function successfully opened and parsed the file "libjavanio.la".
Then it loaded the dependancy library "/usr/lib/libiconv.la"  I think
with no problem since load_deplibs returned 0(zero).
After that it entered find_module with parameter "old_name =
libjavanio.a" and "dir = /usr/local/classpath/lib/classpath/".
The find_module function actually returns 1, which is assumed as
error. It calls tryall_dlopen , which on its side calls
loader->module_open (data, filename);
This is in my case presym_open function call, which goes through a
global list of symbols and returns success, when it finds a symbol
that matches the filename.
Unfortunately there is no such symbol in the preloaded_symbols list. I
dumped the list by myself with a smal simple function that dumps every
symbol name in the list and I could not find the name of the library
libjavanio.a in this list. At this point error is returned and I think
somewhere here is key to the problem I am experiencing.



2007/10/8, Dalibor Topic <robilad at kaffe.org>:
> Yavor Georgiev wrote:
> > Hi :)
> >
> > AT least my 'ls' command and hexdump shows that I have some stuff in it :)
> >
> > $ ls -al /usr/local/classpath/lib/classpath/
> > total 2784
> > drwxr-xr-x 2 Administrator None       0 Oct  2 12:28 .
> > drwxr-xr-x 4 Administrator None       0 Oct  2 12:28 ..
> > -rw-r--r-- 1 Administrator None  299960 Oct  2 12:28 libjavaio.a
> > -rw-r--r-- 1 Administrator None     768 Oct  2 12:28 libjavaio.la
> > -rw-r--r-- 1 Administrator None 1141678 Oct  2 12:28 libjavalang.a
> > -rw-r--r-- 1 Administrator None     774 Oct  2 12:28 libjavalang.la
> > -rw-r--r-- 1 Administrator None   27978 Oct  2 12:28 libjavalangmanagement.a
> > -rw-r--r-- 1 Administrator None     804 Oct  2 12:28 libjavalangmanagement.la
> > -rw-r--r-- 1 Administrator None   27494 Oct  2 12:28 libjavalangreflect.a
> > -rw-r--r-- 1 Administrator None     795 Oct  2 12:28 libjavalangreflect.la
> > -rw-r--r-- 1 Administrator None  446200 Oct  2 12:28 libjavanet.a
> > -rw-r--r-- 1 Administrator None     796 Oct  2 12:28 libjavanet.la
> > -rw-r--r-- 1 Administrator None  527238 Oct  2 12:28 libjavanio.a
> > -rw-r--r-- 1 Administrator None     792 Oct  2 12:28 libjavanio.la
> > -rw-r--r-- 1 Administrator None   33994 Oct  2 12:28 libjavautil.a
> > -rw-r--r-- 1 Administrator None     774 Oct  2 12:28 libjavautil.la
> > 2007/10/8, Dalibor Topic <robilad at kaffe.org>:
> >
> >
> Ouch. Well, ok. Then it's time to grab gdb, and try to figure out what's
> going wrong, I guess.
>
> KAFFE_DEBUG=gdb kaffe HelloWorldApp
>
> should get gdb fired up. You'll see a SIGSEGV from the stack size
> detection code, which is safe to continue from.
> You'll want to read kaffe/kaffevm/external.c, where the native library
> loading code sits, and set breakpoints on the
> functions accordingly.
>
> cheers,
> dalibor topic
>


-- 

Best regards,
 yavor                            mailto:yavor.g.georgiev at gmail.com




More information about the kaffe mailing list