[kaffe] powerpc stack frame info needed.

Riccardo Mottola zuse at libero.it
Sun Jul 3 15:35:32 PDT 2005


Hey all,

since guilhem hacked on darwin/jit and made progress, I was stimulated 
to have a look at porting it to linux and netbsd too.

I did this together with the "macro patches" I will write about in my 
next mail and I have made some progress, but what gives me trouble is:

1. EXCEPTIONFRAME and exceptionFrame. Right now they exist only for 
darwin and their definition sugests trouble:

/*
  * Exception stack frame for Kaffe.  The Apple calling conventions 
store the
  * interesting bits in the caller's stack frame so we only need to keep a
  * pointer to it.  This is in contrast to conventions like the x86 
where the
  * previous frame pointer and return pc are stored together in the callee's
  * frame.
  *
  * sp - Pointer to the current stack frame.
  */
typedef struct _exceptionFrame {
         ppc_stack_frame_t *sp;
} exceptionFrame;


2. netbsd doesn't like sigcontext. It is there for compatibility only. 
It is better to use siginfo where possible and ucontext and other 
machine-dependet stuff they provide also to end-user headers. A quick 
glimpse shows that freebsd might be similar, I didn't found their 
specific context implementation, but sigcontext is too "exported" by 
some internal stuff.

thus what bothers me is 1. true for non-darwin os's too ? then it is 
problematic to find the requested information (that currently is 
extraced by some kernel internal register stuff from sigcontext) from 
siginfo or something similar. (ctx is a siginfo...)
or maybe netbsd has a more standard stack frame like netbsd/sparc and 
netbsd/x86 which have an identical EXCEPTIONFRAME but then have an 
internal (different) struct to handle the data.

Ideas? suggestions? Information?

-Riccardo




More information about the kaffe mailing list