[kaffe] debugging kaffe117 on the arm (iphone)

Dalibor Topic robilad at kaffe.org
Fri Oct 19 12:26:17 PDT 2007

Dario Laverde wrote:
> Hi all,
> Thanks to Dalibor for pointers on getting kaffe cross compiled to a new port
> (arm/darwin in this case). We should document the process a bit better perhaps and
> provide a way to document to a wiki of sorts. Anyway after finally successfully
> cross compiling I'm now debugging run time issues:
> -bash-3.2# pwd
> /usr/local/kaffe/jre/bin
> -bash-3.2# export KAFFELIBRARYPATH=/usr/local/kaffe/jre/lib/arm
> -bash-3.2# ls
> HelloIPhone.class  HelloIPhone.java  kaffe  kaffe-bin  rmiregistry
> -bash-3.2# ./kaffe-bin -cp . HelloIPhone
> Internal error: caught an unexpected exception.
> Please check your CLASSPATH and your installation.
> java/lang/StackOverflowError
> This error may occur because the stack size is not sufficient.
> Try to increase the stack size using 'ulimit -s' or with the '-ss'
> option on kaffe.
> Bus error
> I tried several sizes e.g. -ss1M or -ss500K with the same error, it's probably a
> more sinister issue but again any pointers would be appreciated.

Yeah. This is where the real fun starts. You'll need a debugger,
preferrably gdb on the device, and you'll need to run Kaffe as in

KAFFE_DEBUG=gdb ./kaffe-bin -cp . HelloIPhone

to see what's going wrong, and to check out FAQ.debugging.

The first SIGSEGV is likely going to be our stack size checking code, so
you can safely cont from it, and set gdb to
handle SIGXY noprint
if it pops up with a signal XY message (usually USR1/USR2, but the
actual numbers depend on the OS).

Alternatively, you can run kaffe-bin with the
-vmdebug ALL option, that will show you all sorts of debug output, that
would be interesting to bzip2 and attach to a reply.

dalibor topic

More information about the kaffe mailing list