This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What classes have depth==0?


Martin Kahlert wrote:

> I have the problem, that inside java/lang/natClass.cc
> (function _Jv_IsAssignableFrom) i get at the very last if an SEGV
> whith my app: I end up with
> ancestors = 0x41cfafec, source->depth = 5 target->depth = 0
> If i get here, target is no
> - array,
> - Interface
> - primitive
> - ObjectClass
> So what the heck is it? The error shows up when compiling a very
> huge application with libefence.

You can try something like "printf "%s\n", target->name->data" from within gdb
to get the name of the class. As an alternative you can add some debugging code
to the function to print out the name of the class and other data in the event
something unexpected happens (such as a depth == 0 class that is not caught by
one of the conditions).

As Jeff said, you should also rebuild libgcj with "CCFLAGS = "-O0 -g"" when
doing this sort of debugging to avoid seeing confusing behavior from gdb due to
optimizations.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]