Linked by Eugenia Loli-Queru on Wed 13th Dec 2006 04:33 UTC, submitted by IdaAshley
Linux By focusing on the analysis of data captured using signal handlers, you can speed up the most time-consuming part of debugging: finding the bug. This article gives a background on Linux signals with examples specifically tested on PPC Linux, then goes on to show how to design your handlers to output information that lets you quickly home in on failed portions of code.
Permalink for comment 191603
To read all comments associated with this story, please click here.
do it right
by taos on Wed 13th Dec 2006 06:28 UTC
taos
Member since:
2005-11-16

So many 'smart' programmers write their own handler for SIGSEGV, SIGILL etc. in the application, which often makes debugging much more complicated if not impossible.

My advice: if you really want to do that, then also provide a way to disable your non-default handler at run time without the need of recompiling.

BTW, better read about signal-safe and 'reentrant functions' (printf?) before write your handlers.