Changeset 56bce65 in git for libpolys/reporter/dError.cc
- Timestamp:
- Jul 27, 2012, 7:02:58 PM (12 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 6e81fc109b87ebfc796436d4e9472bc3819b5974
- Parents:
- 868735e4d3507b1edcdb4f3879fc5913562b997b
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-27 19:02:58+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-27 19:03:53+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/reporter/dError.cc
r868735 r56bce65 24 24 } 25 25 26 #define HAVE_EXECINFO 27 #define HAVE_CXXABI 26 #ifdef HAVE_EXECINFO_H 27 #include <execinfo.h> 28 #endif 28 29 29 #ifdef HAVE_EXECINFO 30 #include <execinfo.h> 30 #ifdef HAVE_UNISTD_H 31 31 #include <unistd.h> 32 32 #endif 33 33 34 #ifdef HAVE_ CXXABI34 #ifdef HAVE_GCC_ABI_DEMANGLE 35 35 #include <cxxabi.h> 36 36 #endif … … 38 38 39 39 #include <reporter/reporter.h> 40 40 41 #ifdef HAVE_CONFIG_H 41 42 #include <omalloc/omalloc.h> … … 56 57 int dReportError(const char* fmt, ...) 57 58 { 58 #ifdef HAVE_EXECINFO 59 #ifdef HAVE_EXECINFO_H 59 60 #define SIZE 50 60 61 void *buffer[SIZE+1]; int i, j, k, ret, status; char **ptr; char *demangledName; char *s; char *ss; … … 74 75 #endif 75 76 76 #ifdef HAVE_EXECINFO 77 ret = backtrace( buffer, SIZE ); 77 #ifdef HAVE_EXECINFO_H 78 ret = backtrace( buffer, SIZE ); // execinfo.h 78 79 fprintf(stderr, "\nExecinfo backtrace (with %zd stack frames): \n", ret); 79 80 80 #ifndef HAVE_ CXXABI81 backtrace_symbols_fd(buffer, ret, STDERR_FILENO); 81 #ifndef HAVE_GCC_ABI_DEMANGLE 82 backtrace_symbols_fd(buffer, ret, STDERR_FILENO); // execinfo.h 82 83 #else 83 ptr = backtrace_symbols( buffer, ret ); 84 ptr = backtrace_symbols( buffer, ret ); // execinfo.h 84 85 85 86 for (i = 0; i < ret; i++) … … 100 101 { 101 102 ss[0] = 0; 102 demangledName = abi::__cxa_demangle( s, NULL, NULL, &status ); 103 demangledName = abi::__cxa_demangle( s, NULL, NULL, &status ); // cxxabi.h! 103 104 if( status == 0 && demangledName != NULL ) 104 105 fprintf (stderr, " '%s'", (demangledName[0] != 0)? demangledName: s); … … 129 130 dErrorBreak(); 130 131 #else 131 fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR .");132 fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR::Spielwiese."); 132 133 fprintf(stderr, "// !!! Please, email the input\n// and the following error message to singular@mathematik.uni-kl.de") 133 134 vfprintf(stderr, fmt, ap);
Note: See TracChangeset
for help on using the changeset viewer.