trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r884403 - /incubator/trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc
Date Thu, 26 Nov 2009 05:31:29 GMT
Author: pquerna
Date: Thu Nov 26 05:31:29 2009
New Revision: 884403

URL: http://svn.apache.org/viewvc?rev=884403&view=rev
Log:
TS-2: ifdef out linux specific bits of getting a backtrace and restoring the signal frame.
(should come back to this later)
(cherry picked from commit 2c31f7e41ab42c0bf9b24070ad2fda71d1006d05)

Modified:
    incubator/trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc

Modified: incubator/trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_stack_trace.cc?rev=884403&r1=884402&r2=884403&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc (original)
+++ incubator/trafficserver/traffic/trunk/libinktomi++/ink_stack_trace.cc Thu Nov 26 05:31:29
2009
@@ -32,18 +32,27 @@
 
 #include <execinfo.h>           /* for backtrace_symbols, etc. */
 #include <signal.h>
+
+#ifdef __linux__
+/* TODO: port this more correctly to non-Linux platforms. */
+#define HAVE_SIGCONTEXT
+#endif
+
 struct sigframe
 {
   char *pretcode;
   int sig;
+#ifdef HAVE_SIGCONTEXT
   struct sigcontext sc;
   struct _fpstate fpstate;
+#endif
 };
 
 static void
 ink_restore_signal_handler_frame(void **stack, int len, int signalhandler_frame)
 {
-  void **fp;
+#ifdef HAVE_SIGCONTEXT
+    void **fp;
   int i;
   struct sigframe *sf;
   struct sigcontext *scxt;
@@ -64,6 +73,7 @@
 #endif
   for (i = signalhandler_frame + 2; i < len - 1; i++)
     stack[i] = stack[i + 1];
+#endif
 }
 
 int



Mime
View raw message