problem in kaffe jit code debugging using gdb

Veeral Shah veerals at csa.iisc.ernet.in
Sun Oct 3 05:17:01 PDT 1999


hello,

   Nature Of Problem :  Unable to debug Kaffe JIt with gdb/jdb..


    As suggested I re configured kaffe with below command


bash>./configure  --enable-debug --without-x
--prefix=/sarva/me/98/csashah/kaffe --enable-ltdl       -convenience
--with-engine=jit --with-timing
bash>./gmake
bash>./gmake install

1)
  my BUILD_ENVIRONMENT file has following settings .I always source
BUILD_ENVIRONMENT file..
-----------------------------------------------------------------------------------------
CLASSPATH=${CLASSPATH-.}':'/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/javalib/Klasses.jar':'/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/javalib/pizza.jar;
export CLASSPATH
-----------------------------------------------------------------------------------------
KAFFELIBRARYPATH=${KAFFELIBRARYPATH+"$KAFFELIBRARYPATH"':'}/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/native:/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/net:/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/io:/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/zip:/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/math:/sarva/me/98/csashah/caffe/kaffe-1.0b4/libraries/clib/management;
 export KAFFELIBRARYPATH
-----------------------------------------------------------------------------------------
JAVA=/sarva/me/98/csashah/caffe/kaffe-1.0b4/kaffe/kaffe/Kaffe; export
JAVA
-----------------------------------------------------------------------------------------
KAFFE_DEBUG=gdb;export KAFFE_DEBUG
-----------------------------------------------------------------------------------------

  I then tried to run gdb but it says that (my .gdbinit also is set ..)
"/sarva/me/98/csashah/kaffe/bin/Kaffe": not in executable format: File
format not recognized

-  Then i tried to run jdb ..It didnt crib like above but says Kaffe
could not be initialised 
   It dumps like below ..And with the following error ..

-----------------------------------------------------------------------------------------
(gdb) run
    /sarva/me/98/csashah/kaffe/libexec/Kaffe sun.tools.ttydebug.TTY
Kaffe Str

Could not initialize Kaffe.

It's likely that your CLASSPATH settings are wrong.  Please make sure
your CLASSPATH does not include any java.lang.* classes from other JVM
vendors, such as Sun's classes.zip, BEFORE Kaffe's Klasses.jar.
It is okay to have classes.zip AFTER Klasses.jar

The current effective classpath is
`.:/usr/pubpkg/java/jdk1.1.1/lib/classes.zip'
-----------------------------------------------------------------------------------------
My classpath settings on echo $CLASSPATH shows no classes.zip library 
from Sun...

Can any one tell me what is going wrong ..

   Any feedback would be  a great help....

Thanks in Advance
Regards
Veeral


> Veeral Shah writes:
> > I am trying to debug the Kaffe jit code on sparc machine using gdb .But
> > the gdb cribs that the executable(Kaffe)format is not recognised.The
> > executable doesnt crib while running alone.
> >   I have given -g option (though $CFLAGS takes care of that option )as
> > well as enabled the DDEBUG option in the makefiles but still i am not
> > able to make out where lies the problem.I am sure that I am missing
> > something in setting the proper options..
> >   I would be really thankful if someone guides me on where could lie the
> > problem.
> 
> This doesn't answer your question, but FYI there is an easier way
> to do debugging with kaffe (recent CVS)..
> 
>   1. Configure kaffe "--enable-debug"
>   2. Compile and install
>   3. Set environment variable "KAFFE_DEBUG" to "gdb"
> 
> Then you will automatically run gdb with the proper arguments, etc.
> See also developers/gdbinit.
> 
> -Archie
> 
> ___________________________________________________________________________
> Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list