This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
sigaction() function
- From: ranjith kumar <ranjithproxy at gmail dot com>
- To: linux dot kernel at googlegroups dot com, gcc-help at gcc dot gnu dot org, bugs at dyninst dot org, paradyn at cs dot wisc dot edu
- Date: Wed, 18 Nov 2009 01:09:32 +0530
- Subject: sigaction() function
Hi,
I have one question about sigaction() function.
Suppose in a program sigaction() is called to change the action taken
by the process on receipt of a SIGTRAP signal.
Let us say sigaction function is:
void sig_sigaction(int, siginfo_t *, void *);
When the program hits a trap at address=the contents of register
REGPC(program counter),
let us say the registers are REGPC,REG1,.........
So when that trap is hit, KERNEL will modify the REGPC to point to
starting address of 'sig_sigaction' function.
But what about other registers and stack?? KERNEL may modify other
registers and may write some thing on stack??
Thanks in advance.
Please ignore me if this question is not related to this group.