Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Uncle George <gatgul@voicenet.com>
To: axp-list@redhat.com
Subject: Re: stack layout in signal handling proc
Date: Wed, 03 Jun 1998 19:51:50 -0400	[thread overview]
Message-ID: <3575E194.FE8ADC9@voicenet.com> (raw)
In-Reply-To: 19980603200825.21992.qmail@frodo.ho.com

stack setup and unwinding is done inside the kernel.

on a sig, the current environment is placed on the user stack, and the
parameters to the sig handler is placed in registers( the first 6 parms to a
routine are place in registers )
although u should only get a signum as a parameter to the sig handler, i beleive
that there are 2 more. I think the third parameter is a pointer to the saved
area ( as saved by the kern).

unwinding is done when ur sig handler does a jsr 0(26) which then executes a
small pgm left on the stack by the kernel, which then traps to the kern, wher
the kern will fix up the stack and continue from the saved pc address ( while in
the sig routine, u can change the return address to be something else )

dragisha@frodo.ho.com wrote:

>   hi,
>
>   is there someone kind knowledgeable and kind to enlighten me on above
> mentioned subject? I am searching through various .h's and few doc's without
> much success (my code in question still does not work :).
>
>   standard (?) behaviour is to put one integer (signum) some
> not-well-defined structure (sigcontext?) whose size is something like 19x8
> bytes. and one integer (code) and then jump to signal handler. Does gdb know
> how to interpret program stack inside signal handling procedure? who is
> responsible for stack cleaning on exit?
>
>   Thanks in advance,
>   dragisha
>
>
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com




  reply	other threads:[~1998-06-03 23:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-03 20:08 stack layout in signal handling proc dragisha
1998-06-03 23:51 ` Uncle George [this message]
1998-06-05  6:48 ` Richard Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox