From f6f5f6367599cff9ec014c2950359dffa052404d Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Thu, 22 Jul 2021 11:51:19 +0200 Subject: - removed backtrace --- src/testbed/gnunet-cmds-helper.c | 62 ++-------------------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) (limited to 'src/testbed/gnunet-cmds-helper.c') diff --git a/src/testbed/gnunet-cmds-helper.c b/src/testbed/gnunet-cmds-helper.c index 41d6c06b8..0d618bd48 100644 --- a/src/testbed/gnunet-cmds-helper.c +++ b/src/testbed/gnunet-cmds-helper.c @@ -44,7 +44,7 @@ #include "testbed_api.h" #include "gnunet_testing_plugin.h" #include -#include "execinfo.h" + /** * Generic logging shortcut @@ -60,8 +60,6 @@ #define ROUTER_BASE_IP "92.68.150." -#define MAX_TRACE_DEPTH 50 - /** * Handle for a plugin. */ @@ -180,61 +178,6 @@ static int done_reading; static int status; -struct BacktraceInfo -{ - /** - * Array of strings which make up a backtrace from the point when this - * task was scheduled (essentially, who scheduled the task?) - */ - char **backtrace_strings; - - /** - * Size of the backtrace_strings array - */ - int num_backtrace_strings; -}; - -/** - * Output stack trace of task @a t. - * - * @param t task to dump stack trace of - */ -static void -dump_backtrace (struct BacktraceInfo *t) -{ - - for (unsigned int i = 0; i < t->num_backtrace_strings; i++) - LOG (GNUNET_ERROR_TYPE_ERROR, - "Task %p trace %u: %s\n", - t, - i, - t->backtrace_strings[i]); - -} - - -/** - * Initialize backtrace data for task @a t - * - * @param t task to initialize - */ -static void -init_backtrace () -{ - struct BacktraceInfo *t; - void *backtrace_array[MAX_TRACE_DEPTH]; - - t = GNUNET_new (struct BacktraceInfo); - t->num_backtrace_strings - = backtrace (backtrace_array, MAX_TRACE_DEPTH); - t->backtrace_strings = - backtrace_symbols (backtrace_array, - t->num_backtrace_strings); - dump_backtrace (t); - -} - - /** * Task to shut down cleanly * @@ -244,7 +187,6 @@ static void shutdown_task (void *cls) { - init_backtrace (); LOG_DEBUG ("Shutting down.\n"); LOG (GNUNET_ERROR_TYPE_ERROR, "Shutting down tokenizer!\n"); @@ -549,7 +491,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message) } -error: + error: status = GNUNET_SYSERR; LOG (GNUNET_ERROR_TYPE_ERROR, "tokenizer shutting down!\n"); -- cgit v1.2.3