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

From: Boehm, Hans <hans_boehm_at_hp.com>
Date: 2001-09-22 07:28:24
In the threads case, I intercept thread creation, and thus capture the
backing store pointer on thread startup.  For the main thread, I use the
variable if its available (glibc 2.2.4+ ?), and a rather brittle heuristic
(which happens to work on current kernels) if it's not.

Hans

> -----Original Message-----
> From: stefan [mailto:stefan@lkcc.org]
> Sent: Friday, September 21, 2001 7:12 AM
> To: David Mosberger
> Cc: linux-ia64@linuxia64.org
> Subject: Re: [Linux-ia64] getcontext() correctly implemented ?
> 
> 
> On Thu, 20 Sep 2001, David Mosberger wrote:
> 
> > You didn't mention the register backing store.  Be sure to scan that
> > one too!  For the main thread, libc exports a global variable which
> > will help you find the beginning of the backing store.  The variable
> > is called "__libc_ia64_register_backing_store_base".  I'm not sure
> > what pthreads does (Hans can you help?).  The top of the register
> > backing store can be obtained from the "sc_bsp" member in 
> the ucontext
> > (uc->uc_mcontext.sc_bsp).
> 
> Wow ! This fixed this specific problem. With a little change:
> uc->uc_mcontext.sc_bsp is uc->uc_mcontext.sc_ar_bsp.
> 
> Thanks a lot,
> 	stefan@lkcc.org
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64
> 
Received on Fri Sep 21 14:28:37 2001

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