Ask a Question related to UNIX Programming, Design and Development.
-
Christian Smith #1
Re: How to dump core
In article <B5cna.60949$jVh.46894@news01.bloor.is.net.cable.r ogers.com>,
"Samuel T" <none@none.com> writes:May be a bit late now, but try installing pthread_kill_other_threads_np() as> Hi all,
> env: gnu/linux/pthread/g++..
> My code has a hard-to-reproduce segfault, but in gdb, it disappeared. The
> app doesn't autogenerate coredump, so how can I generate it outside gdb?
the signal handler for all your fault signals:
struct sigaction sa = { 0 };
/*
* Set the handler for SEGV, BUS, ILL and ABRT to the Linux thread
* function below, to kill the threads so we can produce a core dump.
* It should be safe using pthread_kill_other_threads_np directly,
* as it takes no arguments (will ignore the signo) and returns void
* also.
*/
sa.sa_handler = pthread_kill_other_threads_np;
sa.sa_flags = SA_RESETHAND | SA_RESTART;
sigaction( SIGSEGV, &sa, NULL );
sigaction( SIGBUS, &sa, NULL );
sigaction( SIGILL, &sa, NULL );
sigaction( SIGABRT, &sa, NULL );
We used this to good effect for debugging our code on Linux, but you do lose
the information on the other threads. Better than nothing, however.
Christian
--
"You have not converted a man because you have silenced him." -John Morley
----------------------------------------------------------------------
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \
Christian Smith Guest
-
GDTextUtil-0.86 Makefile core dump
I am getting a compile error (below) while trying to build GDTextUtil-0.86 on AIX 5.3, Perl v5.8.7. The weird thing is that 0.85 builds just fine.... -
ntpd core dump
Hi all, I have 5.3-RELEASE installed. I'm trying to run ntpd but I get a message in /var/log/messages that it exited on signal 11 (core dumped).... -
Core dump in java 1.3 db2
We have DB2 7 installed on an AIX server 5.1, running a stored procedure and executing select, updates and inserts using preparedStatements. On... -
Core Dump in sqleatin_api on UDB 8.1
Hi All, I am seeing a problem with a UDB client application(multi-threaded) that uses the UDB client libraries(libdb2.so) on solaris. I see a... -
gcc program core dump
There is a message of core dump may be related to the scope of variables , please any explainations . it's from a book of C .It is written as it is... -
Haran Shivanan #2
Re: How to dump core
module "Christian Smith" core dumped with the following output:
I don't seem to have the original thread so I'm replying here.> In article <B5cna.60949$jVh.46894@news01.bloor.is.net.cable.r ogers.com>,
> "Samuel T" <none@none.com> writes:>> Hi all,
>> env: gnu/linux/pthread/g++..
>> My code has a hard-to-reproduce segfault, but in gdb, it disappeared. The
>> app doesn't autogenerate coredump, so how can I generate it outside gdb?
Have you already tried abort().
This should generate a core file.
Haran Shivanan Guest



Reply With Quote

