Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 9ee227acff29 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
166 /* If fatal error occurs in code below, avoid infinite recursion. */ | 166 /* If fatal error occurs in code below, avoid infinite recursion. */ |
167 if (! fatal_error_in_progress) | 167 if (! fatal_error_in_progress) |
168 { | 168 { |
169 fatal_error_in_progress = 1; | 169 fatal_error_in_progress = 1; |
170 shut_down_emacs (sig, Qnil); | 170 shut_down_emacs (sig, Qnil); |
171 #ifdef DEBUG_XEMACS | |
172 stderr_out("\nLisp backtrace follows:\n\n"); | 171 stderr_out("\nLisp backtrace follows:\n\n"); |
173 Fbacktrace(Qexternal_debugging_output, Qt); | 172 Fbacktrace(Qexternal_debugging_output, Qt); |
174 | 173 |
175 /* Check for Sun-style stack printing via /proc */ | 174 /* Check for Sun-style stack printing via /proc */ |
176 { | 175 { |
177 char *pstack = "/usr/proc/bin/pstack"; | 176 CONST char *pstack = "/usr/proc/bin/pstack"; |
178 if (access(pstack, X_OK) == 0) | 177 if (access(pstack, X_OK) == 0) |
179 { | 178 { |
180 char buf[100]; | 179 char buf[100]; |
181 stderr_out("\nC backtrace follows:\n" | 180 stderr_out("\nC backtrace follows:\n" |
182 "(A real debugger may provide better information)\n\n"); | 181 "(A real debugger may provide better information)\n\n"); |
183 sprintf(buf, "%s %d >&2", pstack, (int)getpid()); | 182 sprintf(buf, "%s %d >&2", pstack, (int)getpid()); |
184 system(buf); | 183 system(buf); |
185 } | 184 } |
186 } | 185 } |
187 #endif | |
188 } | 186 } |
189 #ifdef VMS | 187 #ifdef VMS |
190 LIB$STOP (SS$_ABORT); | 188 LIB$STOP (SS$_ABORT); |
191 #else | 189 #else |
192 /* Signal the same code; this time it will really be fatal. */ | 190 /* Signal the same code; this time it will really be fatal. */ |
1560 stderr_out | 1558 stderr_out |
1561 ("Your files have been auto-saved.\n" | 1559 ("Your files have been auto-saved.\n" |
1562 "Use `M-x recover-session' to recover them.\n" | 1560 "Use `M-x recover-session' to recover them.\n" |
1563 "\n" | 1561 "\n" |
1564 "Please report this bug to the address `crashes@xemacs.org'.\n" | 1562 "Please report this bug to the address `crashes@xemacs.org'.\n" |
1563 "*MAKE SURE* to include as much configuration information as\n" | |
1564 "possible; at the very least what OS and hardware you are running\n" | |
1565 "on, and hopefully also what compiler and compiler options the\n" | |
1566 "binary was compiled with, what options XEmacs was compiled with,\n" | |
1567 "whether you are using a prebuilt binary from ftp.xemacs.org or\n" | |
1568 "compiled XEmacs yourself for your system, etc.\n" | |
1569 "\n" | |
1565 "If at all possible, *please* try to obtain a C stack backtrace;\n" | 1570 "If at all possible, *please* try to obtain a C stack backtrace;\n" |
1566 "it will help us immensely in determining what went wrong.\n" | 1571 "it will help us immensely in determining what went wrong.\n" |
1567 "To do this, locate the core file that was produced as a result\n" | 1572 "To do this, locate the core file that was produced as a result\n" |
1568 "of this crash (it's usually called `core' and is located in the\n" | 1573 "of this crash (it's usually called `core' and is located in the\n" |
1569 "directory in which you started XEmacs, or maybe in your home\n" | 1574 "directory in which you started XEmacs, or maybe in your home\n" |
1570 "directory), and type\n" | 1575 "directory), and type\n" |
1571 "\n" | 1576 "\n" |
1572 " gdb "); | 1577 " gdb "); |
1573 { | 1578 { |
1574 char *name; | 1579 CONST char *name; |
1575 char *dir = 0; | 1580 char *dir = 0; |
1576 | 1581 |
1577 /* Now try to determine the actual path to the executable, | 1582 /* Now try to determine the actual path to the executable, |
1578 to try to make the backtrace-determination process as foolproof | 1583 to try to make the backtrace-determination process as foolproof |
1579 as possible. */ | 1584 as possible. */ |
1606 unlock_all_files (); | 1611 unlock_all_files (); |
1607 #endif | 1612 #endif |
1608 | 1613 |
1609 #ifdef TOOLTALK | 1614 #ifdef TOOLTALK |
1610 tt_session_quit (tt_default_session ()); | 1615 tt_session_quit (tt_default_session ()); |
1616 #if 0 | |
1617 /* The following crashes when built on X11R5 and run on X11R6 */ | |
1611 tt_close (); | 1618 tt_close (); |
1612 #endif | 1619 #endif |
1620 #endif /* TOOLTALK */ | |
1613 | 1621 |
1614 #ifdef VMS | 1622 #ifdef VMS |
1615 kill_vms_processes (); | 1623 kill_vms_processes (); |
1616 #endif | 1624 #endif |
1617 } | 1625 } |
1619 | 1627 |
1620 #ifndef CANNOT_DUMP | 1628 #ifndef CANNOT_DUMP |
1621 /* Nothing like this can be implemented on an Apollo. | 1629 /* Nothing like this can be implemented on an Apollo. |
1622 What a loss! */ | 1630 What a loss! */ |
1623 | 1631 |
1624 extern int my_edata; | 1632 extern char my_edata[]; |
1625 | 1633 |
1626 #ifdef HAVE_SHM | 1634 #ifdef HAVE_SHM |
1627 | 1635 |
1628 DEFUN ("dump-emacs-data", Fdump_emacs_data, Sdump_emacs_data, 1, 1, 0 /* | 1636 DEFUN ("dump-emacs-data", Fdump_emacs_data, Sdump_emacs_data, 1, 1, 0 /* |
1629 Dump current state of XEmacs into data file FILENAME. | 1637 Dump current state of XEmacs into data file FILENAME. |