aboutsummaryrefslogtreecommitdiff
path: root/src/espik_debug.c
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber.mailing@gmail.com>2006-04-10 20:20:28 +0200
committerbeber <beber@meathook.melee>2006-04-10 20:20:28 +0200
commit8154279a91453985b4c67cd082249a0f7148f1e9 (patch)
tree6a9d617de70abd69502fa2bffe61c6ea5efc4ae3 /src/espik_debug.c
parentimprove configure.in and delete m4 macros (diff)
downloadespik-8154279a91453985b4c67cd082249a0f7148f1e9.tar.xz
remove all old debugging code
Diffstat (limited to 'src/espik_debug.c')
-rw-r--r--src/espik_debug.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/espik_debug.c b/src/espik_debug.c
deleted file mode 100644
index 04b32a1..0000000
--- a/src/espik_debug.c
+++ /dev/null
@@ -1,71 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "espik_debug.h"
-
-#ifdef __GLIBC__
-#include <execinfo.h>
-#endif /* __GLIBC__ */
-
-#ifdef _ESPIK_DEBUG_
-#include <signal.h>
-#endif /* _ESPIK_DEBUG_ */
-
-#if 0
-inline void espik_debug_bt (int num)
-{
-#if 0
-#ifdef __GLIBC__
-#ifdef _ESPIK_DEBUG_
-
- void* array[128];
- size_t size;
- char** strings;
- size_t i;
-
- /*
- if (!debug_bt)
- return;
- */
-
- fprintf(stderr, "\n***** Backtrace (Signal %d) *****\n", num);
- size = backtrace(array, 128);
- strings = backtrace_symbols(array, size);
- for (i = 0 ; i < size ; i++)
- fprintf(stderr, "%s\n", strings[i]);
-
- if (strings)
- free(strings);
-
-#endif /* _ESPIK_DEBUG_ */
-#endif /* __GLIBC__ */
-
-#ifndef __GLIBC__
- fprintf(stderr, "Your system doesn't have glibc. Backtraces disabled."
- "But program receive signal %d.\n", num);
-#endif /* __GLIBC__ */
-#endif
- num ++; /* Just for avoid warning */
-}
-
-void espik_debug_init()
-{
-#ifdef _ESPIK_DEBUG_
- struct sigaction sa;
-
- sa.sa_handler = espik_debug_bt;
- memset (&sa, 0, sizeof (struct sigaction));
- sigaction(SIGSEGV, &sa, (struct sigaction *)0);
- sigaction(SIGINT, &sa, (struct sigaction *)0);
- sigaction(SIGKILL, &sa, (struct sigaction *)0);
-#endif /* _ESPIK_DEBUG_ */
-}
-
-void kill_me (short num)
-{
- espik_debug_bt(num);
- exit (num);
-}
-
-#endif