This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]