This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

gcore and pstack under Linux


Hi,

How about gcore and pstack under Linux ?

Yes, I know that gdb attach PID
do the same as standalone gcore,
but there is a case when it's not usable.

I have long running production service that time to
time (once a month) fails with sig11.

Sig 11 handler looks like:

void sig11_hdl(int sig)
{
 if ( fork() == 0 ) // child
    {  char p[32];
       sprintf(p,"%ld", (long) getppid() );
       execl(GCORE,"gcore", "-o", CORE,p, 0);
    }

sleep(10);

   abort();
}

and than watchdog send me by e-mail:
 pstack CORE | c++filt

It works perfect under Solaris, but I did't find a way to do the same under Linux.


-- Dmitry Samersoff dms@samersoff.net, http://devnull.wplus.net ICQ: 3161705 * There will come soft rains ...


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