Re: [Linux-ia64] getcontext() correctly implemented ?

From: stefan <>
Date: 2001-09-21 08:09:11
On Thu, 20 Sep 2001, David Mosberger wrote:

> To get the full machine context, in a signal handler, you'd have to
> either (a) use stack unwinding to recover the preserved state at the
> point of the signal or (b) use a combination of sigcontext and
> setjmp() or getcontext().  Can say a little more about what you're
> trying to do?  That would make it easier to give a specific example.
> To accomplish (a), we really need a user-level unwinder.  It's been on
> the todo list for some time, but nobody got around to implement it, so
> far.

The garbage collector of GNU Guile does not need the machine context in a
signal handler. It just looks for heap references within the programs
stack. The top of the stack is saved when starting the program, the bottom
is gained from the current stack position when garbage collecting. More
references might be within the machines registers. That is why it uses
setjmp() in order to get these into a defined buffer. On a ia64 Linux
setjump() is not said to save *all* registers. That is why I thought the
getcontext() function could help here. Is that true ? I already tried it
with glibc 2.2.3 without success. Still missed some references...

Thanks in advance,
Received on Thu Sep 20 15:16:41 2001

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:05 EST