public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: stefan <stefan@lkcc.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] getcontext() correctly implemented ?
Date: Thu, 20 Sep 2001 22:09:11 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590698805232@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805230@msgid-missing>

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,
	stefan@lkcc.org



  parent reply	other threads:[~2001-09-20 22:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-20 17:34 [Linux-ia64] getcontext() correctly implemented ? stefan
2001-09-20 18:26 ` David Mosberger
2001-09-20 22:09 ` stefan [this message]
2001-09-20 22:58 ` David Mosberger
2001-09-21  8:41 ` Andrew Haley
2001-09-21 14:11 ` stefan
2001-09-21 21:28 ` Boehm, Hans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590698805232@msgid-missing \
    --to=stefan@lkcc.org \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox