36#ifdef HAVE_GCC_ABI_DEMANGLE
49 void *buffer[SIZE+1];
int ret;
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");
67 ret = backtrace( buffer, SIZE );
68 fprintf(stderr,
"\nExecinfo backtrace (with %zd stack frames): \n", ret);
70#ifndef HAVE_GCC_ABI_DEMANGLE
71 backtrace_symbols_fd(buffer, ret, STDERR_FILENO);
73 char **ptr = backtrace_symbols( buffer, ret );
79 for (
int i = 0;
i < ret;
i++)
88 fprintf (stderr,
" #%02d: '%s': ",
i,
s);
89 ss[0] =
'(';
s = ss + 1;
98 fprintf (stderr,
" '%s'", (demangledName[0] != 0)? demangledName:
s);
100 fprintf (stderr,
" '%s'",
s);
111 fprintf (stderr,
" + %s",
s);
115 fprintf (stderr,
" %s\n", ss + 2);
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 [email protected]");
128 vfprintf(stderr, fmt,
ap);
137#ifndef MAKE_DISTRIBUTION
static void malloc_free(void *ptr)
int dReportError(const char *fmt,...)
const CanonicalForm int s
static int index(p_Length length, p_Ord ord)
#define omPrintCurrentBackTraceMax(A, B)