Re: locating default signal handler for SIGSEGV
Valdis.Kletnieks_at_vt.edu
Date: 12/10/03
- Previous message: npguy: "Re: locating default signal handler for SIGSEGV"
- In reply to: npguy: "Re: locating default signal handler for SIGSEGV"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: npguy <npguy@websurfer.com.np> Date: Wed, 10 Dec 2003 12:13:44 -0500
On Tue, 09 Dec 2003 12:14:17 +0545, npguy said:
> DM> Can anyone tell me how can I locate the signal handler for SIGSEGV,
>
> simply call
>
> sighandler_t signal(int signum, sighandler_t sighd);
I think what he *wanted* to know was, "While looking at an existing binary
using gdb or other debugger, how to determin whether a signal was currently set
to SIG_IGN, SIG_DFL, or the pointer to the function in the binary". Running
the binary under 'strace' or similar will tell you if the signal is getting set
to a function (and the address of it if so). It's quite possible that a given
program doesn't set a handler (for instance, very few programs trap SEGV) so
you *will not* find any code in the binary to do the "catch signal and dump
core", as that's being done for you by the kernel.
- application/pgp-signature attachment: stored
- Previous message: npguy: "Re: locating default signal handler for SIGSEGV"
- In reply to: npguy: "Re: locating default signal handler for SIGSEGV"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]