why dont you give a try in http://code.google.com/p/google-coredumper/or you
can use strace to run your program...



On Fri, Oct 24, 2008 at 1:18 PM, David Hamill <[EMAIL PROTECTED]> wrote:

>   I wrote:
> > I've written a signal handler which intercepts run-time
> > signals such as SIGFPE and SIGSEGV and logs their
> > occurrence, among other things, to a file. (This is for
> > monitoring a web application.)
> >
> > My question: Is there an easy way to find out where a
> > signal
> > originated from? Ideally the file and line of source code,
> > as with the assert() macro. For example if SIGSEGV is
> > raised, it would be very useful to know whereabouts in the
> > code that happened.
> >
> > The setup is gcc, C99, Linux.
>
> Some googling reveals that there's probably no easy way.
> However, there's a difficult way, which involves a stack
> backtrace. The C code and a detailed description are here:
>
>
> http://www.tlug.org.za/wiki/index.php/Obtaining_a_stack_trace_in_C_upon_SIGSEGV
>
> (I haven't actually tried it.)
>
> David
>
>  
>



-- 
Bruno Meirelles Herrera
MsC. Eng. de Produção e Sistemas / Production and Systems Eng.
Eng. de Computação / Computer Eng.

SCJP -Sun Certified Programmer for Java 2 Platform 1.4
SCJA -  Sun Certified Associate for Java Platform


<a href="http://www.linkedin.com/in/bherrera"; ><img src="
http://www.linkedin.com/img/webpromo/btn_profile_bluetxt_80x15.gif";
width="80" height="15" border="0" alt="View Bruno Herrera's profile on
LinkedIn"></a>


[Non-text portions of this message have been removed]

Reply via email to