Author: mvidner
Date: Tue Jan 15 14:25:44 2008
New Revision: 43610
URL: http://svn.opensuse.org/viewcvs/yast?rev=43610&view=rev
Log:
Log the C backtrace when receiving a signal (FATE 302167).
Modified:
trunk/core/VERSION
trunk/core/liby2/src/genericfrontend.cc
trunk/core/package/yast2-core.changes
Modified: trunk/core/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/VERSION?rev=43610&r1=43609&r2=43610&view=diff
==============================================================================
--- trunk/core/VERSION (original)
+++ trunk/core/VERSION Tue Jan 15 14:25:44 2008
@@ -1 +1 @@
-2.16.21
+2.16.22
Modified: trunk/core/liby2/src/genericfrontend.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/genericfrontend.cc?rev=43610&r1=43609&r2=43610&view=diff
==============================================================================
--- trunk/core/liby2/src/genericfrontend.cc (original)
+++ trunk/core/liby2/src/genericfrontend.cc Tue Jan 15 14:25:44 2008
@@ -28,6 +28,9 @@
#include
#include
#include
+#include
+#include
+#include
#include <sstream>
#include
@@ -50,6 +53,21 @@
static void print_error (const char*, ...) __attribute__ ((format (printf, 1, 2)));
static bool is_ycp_value (const char* arg);
+// FATE 302167, info '(libc) Backtraces'
+void
+log_backtrace ()
+{
+ static const int N = 100;
+ void *frames[N];
+ size_t size = backtrace (frames, N);
+ char ** strings = backtrace_symbols (frames, size);
+
+ for (size_t i = 0; i < size; ++i)
+ y2error ("frame %zd: %s", i, strings[i]);
+
+ free (strings);
+}
+
void
signal_handler (int sig)
{
@@ -58,6 +76,7 @@
sig, ee.filename ().c_str (), ee.linenumber ());
y2error ("got signal %d at YCP file %s:%d",
sig, ee.filename ().c_str (), ee.linenumber ());
+ log_backtrace ();
// bye
signal (sig, SIG_DFL);
kill ( getpid (), sig);
Modified: trunk/core/package/yast2-core.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/package/yast2-core.changes?rev=43610&r1=43609&r2=43610&view=diff
==============================================================================
--- trunk/core/package/yast2-core.changes (original)
+++ trunk/core/package/yast2-core.changes Tue Jan 15 14:25:44 2008
@@ -1,7 +1,9 @@
-------------------------------------------------------------------
Tue Jan 15 14:22:31 CET 2008 - mvidner@suse.cz
+- Log the C backtrace when receiving a signal (FATE 302167).
- reverted libpy2UI.so.3 to .so.2 as the plugin loader expects
+- 2.16.22
-------------------------------------------------------------------
Mon Jan 14 12:30:00 CET 2008 - tgoettlicher@suse.de
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org