Re: solaris gdb screen mayhem

From: wwieserat_private
Date: Fri Aug 31 2001 - 04:45:33 PDT

  • Next message: John Hicks: "Re: Email webbugs"

    On Wednesday 29 August 2001 23:51, you wrote:
    >    Execution on a non-executable stack gets a SEGV.   Is there a way
    >    the program can distinguish this from any other SEGV ?
    >
    Read the manual for sigaction(2). 
    Use the signal handler void (*sa_sigaction)(int, siginfo_t *, void *);
    (you will have to set SA_SIGINFO in sa_flags). 
    
    Now, in the signal handler routine, analyze siginfo_t: 
    si_code will show you if SIGSEGV/BUS was generated by kill(2) or kill(1) 
    or by the kernel. You even get the address causing the fault in 
    si_addr. 
    
    The stuff seems to be POSIX.1b so I guess solaris implements it. 
    
    wwieser
    



    This archive was generated by hypermail 2b30 : Fri Aug 31 2001 - 09:06:27 PDT