From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] getcontext() correctly implemented ?
Date: Thu, 20 Sep 2001 18:26:35 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590698805231@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590698805230@msgid-missing>
>>>>> On Thu, 20 Sep 2001 19:34:00 +0200 (CEST), stefan <stefan@lkcc.org> said:
Stefan> Hello list, in order to save the full register set of the
Stefan> ia64 I want to use getcontext(&ctx) instead of
Stefan> setjmp(jmpbuf) and check the registers in ctx.uc_mcontext
Stefan> for references in a garbage collected system.
The *context() routines are designed to support synchronous context
switches only (see glibc FAQ). Thus, they basically save the
"preserved" state only.
Stefan> My question is: Is getcontext() correctly implemented in
Stefan> glibc(). Which version do I need and can I use it for the
Stefan> described purpose at all ?
It's implemented to meet the requirements of SuS. In that sense, it
should be correct (you'll probably need glibc 2.2.4 as there were some
silly bugs in earlier versions).
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.
--david
next prev parent reply other threads:[~2001-09-20 18:26 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 [this message]
2001-09-20 22:09 ` stefan
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-105590698805231@msgid-missing \
--to=davidm@hpl.hp.com \
--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