GCJ and C++ (calling Java from C++)

Andrew Haley aph@redhat.com
Mon Dec 5 19:40:00 GMT 2005


Lothar Werzinger writes:
 > On Monday 05 December 2005 11:19, Andrew Haley wrote:
 > > Lothar Werzinger writes:
 > >  > On Monday 05 December 2005 03:39, Andrew Haley wrote:
 > >  > > Lothar Werzinger writes:
 > >  > >  >From what I learned reading about CNI calling methods on interfaces
 > >  > >  >requires a special dispatch table called otable.
 > >  > >
 > >  > > I don't think so.  As far as I'm aware the otable is only ever
 > >  > > involved when a file has been compiled with -findirect dispatch.  CNI
 > >  > > doesn't use indirect dispatch.  Without indirect dispatch, we'd expect
 > >  > > the otable to be null.
 > >  >
 > >  > The jar and the Java file are compiled with -findirect-dispatch, so I
 > >  > think having a null otable is bad. You should be able to see that in the
 > >  > build.xml in the project I sent you last time.
 > >  >
 > >  > > Which line?  Does the failure occur in the call to get_name?
 > >  >
 > >  > As said in previous postings it fails either in
 > >  >
 > >  >     JvInitClass(LibraryTestClass);
 > >  >
 > >  > or in
 > >  >
 > >  >     String * p_name = p_library->getName();
 > >
 > > But which?  Put a breakpoint on the first line, then step over it.
 > 
 > Maybe I did not make myself clear. If JvInitClass(LibraryTestClass); is 
 > present it fails there. If I comment out the JvInitClass(LibraryTestClass); 
 > it fails in p_library->getName();

The value of p_library is?

Andrew.



More information about the Java mailing list