Re: Returning from signal handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 20, 2008 at 6:02 PM, Pharaoh . <pharaoh137@xxxxxxxxx> wrote:
>
>
> Hi
>
> As per my understanding, whenever a signal handler is returned, sigreturn()
> system call
> is called, so just to test my understanding I wrote a simple app with signal
> handler and
> tried to put a breakpoint at sigreturn call, but I could never hit that
> breakpoint.

Details are something I can not give for now. But here's the idea.
Compile your C program with -g option then load it into gdb. Put
breakpoint at the first line of your signal handler. Then from another
console send a signal to your program. This will trigger the signal
handler.

Right after that, control will go back to gdb. Type "bt" or directly
observe stack frame e.g using "x" command. IIRC, you will see the
address of sys_sigreturn there.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux