45{
46#if 0
47#ifdef HAVE_EXECINFO_H
48#define SIZE 50
49 void *buffer[SIZE+1]; int ret;
50#endif
51#endif
52
55#ifndef MAKE_DISTRIBUTION
56 fprintf(stderr, "\n// ***dError: ");
57 vfprintf(stderr, fmt,
ap);
58#if !defined(OM_NDEBUG)
59 #ifdef omPrintCurrentBackTraceMax
60 fprintf(stderr, " occurred at: \n");
62 #endif
63#endif
64
65#if 0
66#ifdef HAVE_EXECINFO_H
67 ret = backtrace( buffer, SIZE );
68 fprintf(stderr, "\nExecinfo backtrace (with %zd stack frames): \n", ret);
69
70#ifndef HAVE_GCC_ABI_DEMANGLE
71 backtrace_symbols_fd(buffer, ret, STDERR_FILENO);
72#else
73 char **ptr = backtrace_symbols( buffer, ret );
74
76 char *demangledName;
78 char *ss;
79 for (
int i = 0;
i < ret;
i++)
80 {
82
84
85
87 ss[0] = 0;
88 fprintf (stderr,
" #%02d: '%s': ",
i,
s);
89 ss[0] =
'(';
s = ss + 1;
90
92
94 {
95 ss[0] = 0;
98 fprintf (stderr,
" '%s'", (demangledName[0] != 0)? demangledName:
s);
99 else
100 fprintf (stderr,
" '%s'",
s);
101
103 ss[0] = '+';
105 }
106
109 {
110 ss[0] = 0;
111 fprintf (stderr,
" + %s",
s);
112 ss[0] = ')';
113 }
114
115 fprintf (stderr, " %s\n", ss + 2);
116 }
118#endif
119#endif
120
121#undef SIZE
122#endif
123
125#else
126 fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
127 fprintf(stderr, "// !!! Please, email the input\n// and the following error message to singular@mathematik.uni-kl.de");
128 vfprintf(stderr, fmt,
ap);
129#endif
130 return 0;
131}
static void malloc_free(void *ptr)
const CanonicalForm int s
static int index(p_Length length, p_Ord ord)
#define omPrintCurrentBackTraceMax(A, B)