| 1893 | # endif |
| 1894 | |
| 1895 | void |
| 1896 | NH_abort(char *why USED_FOR_CRASHREPORT) |
| 1897 | { |
| 1898 | #ifdef PANICTRACE |
| 1899 | int gdb_prio = SYSOPT_PANICTRACE_GDB; |
| 1900 | int libc_prio = SYSOPT_PANICTRACE_LIBC; |
| 1901 | #endif |
| 1902 | static volatile boolean aborting = FALSE; |
| 1903 | |
| 1904 | /* don't execute this code recursively if a second abort is requested |
| 1905 | while this routine or the code it calls is executing */ |
| 1906 | if (aborting) |
| 1907 | return; |
| 1908 | aborting = TRUE; |
| 1909 | |
| 1910 | #ifdef PANICTRACE |
| 1911 | #ifdef CRASHREPORT |
| 1912 | if(!submit_web_report(1, "Panic", why)) |
| 1913 | #endif |
| 1914 | { |
| 1915 | #ifndef VMS |
| 1916 | if (gdb_prio == libc_prio && gdb_prio > 0) |
| 1917 | gdb_prio++; |
| 1918 | |
| 1919 | if (gdb_prio > libc_prio) { |
| 1920 | (void) (NH_panictrace_gdb() |
| 1921 | || (libc_prio && NH_panictrace_libc())); |
| 1922 | } else { |
| 1923 | (void) (NH_panictrace_libc() |
| 1924 | || (gdb_prio && NH_panictrace_gdb())); |
| 1925 | } |
| 1926 | |
| 1927 | #else /* VMS */ |
| 1928 | /* overload otherwise unused priority for debug mode: 1 = show |
| 1929 | traceback and exit; 2 = show traceback and stay in debugger */ |
| 1930 | /* if (wizard && gdb_prio == 1) gdb_prio = 2; */ |
| 1931 | vms_traceback(gdb_prio); |
| 1932 | nhUse(libc_prio); |
| 1933 | |
| 1934 | #endif /* ?VMS */ |
| 1935 | } |
| 1936 | #ifndef NO_SIGNAL |
| 1937 | panictrace_setsignals(FALSE); |
| 1938 | #endif |
| 1939 | #endif /* PANICTRACE */ |
| 1940 | #if defined(WIN32) |
| 1941 | win32_abort(); |
| 1942 | #else |
| 1943 | abort(); |
| 1944 | #endif |
| 1945 | } |
| 1946 | |
| 1947 | #undef USED_FOR_CRASHREPORT |
| 1948 | /*end.c*/ |
no test coverage detected