From: t3sserakt Date: Sat, 25 Nov 2017 17:03:03 +0000 (+0100) Subject: tried to print out stacktrace, not working. removed. X-Git-Tag: gnunet-0.11.0rc0~48^2~1^2~16^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1522bb78401dd739299cc507e7237df32f239a3f;p=oweals%2Fgnunet.git tried to print out stacktrace, not working. removed. --- diff --git a/src/util/mq.c b/src/util/mq.c index 58aba7797..4984df76c 100644 --- a/src/util/mq.c +++ b/src/util/mq.c @@ -28,6 +28,30 @@ #define LOG(kind,...) GNUNET_log_from (kind, "util-mq",__VA_ARGS__) +//#if HAVE_EXECINFO_H +//#include "execinfo.h" + +///** +// * Use lsof to generate file descriptor reports on select error? +// * (turn off for stable releases). +// */ +//#define USE_LSOF GNUNET_NO + +///** +// * Obtain trace information for all scheduler calls that schedule tasks. +// */ +//#define EXECINFO GNUNET_NO + +///** +// * Check each file descriptor before adding +// */ +//#define DEBUG_FDS GNUNET_NO + +///** +// * Depth of the traces collected via EXECINFO. +// */ +//#define MAX_TRACE_DEPTH 50 +//#endif struct GNUNET_MQ_Envelope { @@ -866,6 +890,18 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "MQ destroy drops current message of type %u\n", ntohs (mq->current_envelope->mh->type)); +//#if EXECINFO +// void *backtrace_array[MAX_TRACE_DEPTH]; +// int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); +// char **backtrace_strings = +// backtrace_symbols (backtrace_array, +// t->num_backtrace_strings); +// for (unsigned int i = 0; i < num_backtrace_strings; i++) +// LOG (GNUNET_ERROR_TYPE_DEBUG, +// "client drop trace %u: %s\n", +// i, +// backtrace_strings[i]); +//#endif GNUNET_MQ_discard (mq->current_envelope); mq->current_envelope = NULL; GNUNET_assert (0 < mq->queue_length); diff --git a/src/util/service.c b/src/util/service.c index b4eb33caa..c204f1f87 100644 --- a/src/util/service.c +++ b/src/util/service.c @@ -36,6 +36,30 @@ #include "gauger.h" #endif +//#if HAVE_EXECINFO_H +//#include "execinfo.h" + +///** +// * Use lsof to generate file descriptor reports on select error? +// * (turn off for stable releases). +// */ +//#define USE_LSOF GNUNET_NO + +///** +// * Obtain trace information for all scheduler calls that schedule tasks. +// */ +//#define EXECINFO GNUNET_NO + +///** +// * Check each file descriptor before adding +// */ +//#define DEBUG_FDS GNUNET_NO + +///** +// * Depth of the traces collected via EXECINFO. +// */ +//#define MAX_TRACE_DEPTH 50 +//#endif #define LOG(kind,...) GNUNET_log_from (kind, "util-service", __VA_ARGS__) @@ -2529,18 +2553,18 @@ GNUNET_SERVICE_client_drop (struct GNUNET_SERVICE_Client *c) c, c->mq); -#if EXECINFO - void *backtrace_array[MAX_TRACE_DEPTH]; - int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); - char **backtrace_strings = - backtrace_symbols (backtrace_array, - t->num_backtrace_strings); - for (unsigned int i = 0; i < num_backtrace_strings; i++) - LOG (GNUNET_ERROR_TYPE_DEBUG, - "client drop trace %u: %s\n", - i, - backtrace_strings[i]); -#endif +//#if EXECINFO +// void *backtrace_array[MAX_TRACE_DEPTH]; +// int num_backtrace_strings = backtrace (backtrace_array, MAX_TRACE_DEPTH); +// char **backtrace_strings = +// backtrace_symbols (backtrace_array, +// t->num_backtrace_strings); +// for (unsigned int i = 0; i < num_backtrace_strings; i++) +// LOG (GNUNET_ERROR_TYPE_DEBUG, +// "client drop trace %u: %s\n", +// i, +// backtrace_strings[i]); +//#endif if (NULL != c->drop_task) {