This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ and C++ (calling Java from C++)
On Monday 05 December 2005 11:40, Andrew Haley wrote:
> Lothar Werzinger writes:
> > 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?
JvInitClass(LibraryTestClass) is NOT commented out:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1450252512 (LWP 28388)]
0x55bb2402 in _Jv_Linker::verify_class (klass=0x804d6e0) at link.cc:1573
1573 klass->engine->verify(klass);
(gdb) up
#1 0x55bb36c9 in _Jv_Linker::wait_for_state (klass=0x804d6e0, state=9)
at link.cc:1723
1723 verify_class (klass);
(gdb)
#2 0x55be48e5 in java::lang::VMClassLoader::resolveClass (klass=0x804d6e0)
at natVMClassLoader.cc:44
44 _Jv_Linker::wait_for_state (klass, JV_STATE_LINKED);
(gdb)
#3 0x55bdba69 in java::lang::Class::initializeClass (this=0x804d6e0)
at natClass.cc:728
728 java::lang::VMClassLoader::resolveClass (this);
(gdb)
#4 0x0804b74c in _Jv_InitClass (klass=0x804d6e0) at Class.h:581
581 klass->initializeClass ();
(gdb)
#5 0x0804b75f in JvInitClass (cls=0x804d6e0) at cni.h:30
30 return _Jv_InitClass (cls);
(gdb)
#6 0x0804b42d in main (argc=1, argv=0xffffc174) at main.cpp:134
134 JvInitClass(LibraryClass);
(gdb) p p_library
$1 = (struct org::eclipse::emf::examples::extlibrary::Library *) 0x3ea2d0
(gdb) p *p_library
$2 = <incomplete type>
JvInitClass(LibraryTestClass) is NOT commented out:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1450252512 (LWP 16839)]
0x55bd9d42 in _Jv_LookupInterfaceMethodIdx (klass=0x0, iface=0x0,
method_idx=1)
at natClass.cc:995
995 _Jv_IDispatchTable *cldt = klass->idt;
(gdb) p klass
$1 = 0x0
(gdb) up
#1 0x0804b442 in main (argc=1, argv=0xffffab94) at main.cpp:136
136 String * p_name = p_library->getName();
(gdb) p p_library
$2 = (struct org::eclipse::emf::examples::extlibrary::Library *) 0x3ba180
(gdb) p *p_library
$3 = <incomplete type>
> Andrew.
Lothar
--
Lothar Werzinger Dipl.-Ing. Univ.
framework & platform architect
Tradescape Inc.
111 West St. John Street, Suite 200
San Jose, Ca 95113
email: lothar@tradescape.biz