diff options
| author | Eli Zaretskii | 2011-11-25 14:17:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-11-25 14:17:33 +0200 |
| commit | 034ea24ddb8c58aa69736d49ffa10fdd4b1a9847 (patch) | |
| tree | 950fc51223e73dcb0da1d8c2568ae6b73beec93f | |
| parent | 8c535114e2eceabcf14127715dccf7842f5b55a8 (diff) | |
| download | emacs-034ea24ddb8c58aa69736d49ffa10fdd4b1a9847.tar.gz emacs-034ea24ddb8c58aa69736d49ffa10fdd4b1a9847.zip | |
nt/INSTALL: Elaborate on debugging fatal errors.
| -rw-r--r-- | nt/ChangeLog | 4 | ||||
| -rw-r--r-- | nt/INSTALL | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 8de94033196..3aa7bd658e4 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-11-25 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * INSTALL: Elaborate on debugging fatal errors. | ||
| 4 | |||
| 1 | 2011-11-15 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-11-15 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * README.W32: Update the GTK Windows download URL for libpng. | 7 | * README.W32: Update the GTK Windows download URL for libpng. |
diff --git a/nt/INSTALL b/nt/INSTALL index bb621dceb6b..7dc027f06f4 100644 --- a/nt/INSTALL +++ b/nt/INSTALL | |||
| @@ -599,6 +599,30 @@ | |||
| 599 | the debugger, and you will be able to debug the cause of the fatal | 599 | the debugger, and you will be able to debug the cause of the fatal |
| 600 | error. | 600 | error. |
| 601 | 601 | ||
| 602 | The single most important thing to find out when Emacs aborts or | ||
| 603 | crashes is where did that happen in the Emacs code. This is called | ||
| 604 | "backtrace". | ||
| 605 | |||
| 606 | Emacs on Windows uses more than one thread. When Emacs aborts due | ||
| 607 | to a fatal error, the current thread may not be the application | ||
| 608 | thread running Emacs code. Therefore, to produce a meaningful | ||
| 609 | backtrace from a debugger, you need to iunstruct it to show the | ||
| 610 | backtrace for every thread. With GDB, you do it like this: | ||
| 611 | |||
| 612 | (gdb) thread apply all backtrace | ||
| 613 | |||
| 614 | To run Emacs under a debugger to begin with, simply start it from | ||
| 615 | the debugger. With GDB, chdir to the `src' directory (if you have | ||
| 616 | the source tree) or to a directory with the `.gdbinit' file (if you | ||
| 617 | don't have the source tree), and type these commands: | ||
| 618 | |||
| 619 | C:\whatever\src> gdb x:\path\to\emacs.exe | ||
| 620 | (gdb) run <ARGUMENTS TO EMACS> | ||
| 621 | |||
| 622 | Thereafter, use Emacs as usual; you can minimize the debugger | ||
| 623 | window, if you like. The debugger will take control if and when | ||
| 624 | Emacs crashes. | ||
| 625 | |||
| 602 | Emacs functions implemented in C use a naming convention that reflects | 626 | Emacs functions implemented in C use a naming convention that reflects |
| 603 | their names in lisp. The names of the C routines are the lisp names | 627 | their names in lisp. The names of the C routines are the lisp names |
| 604 | prefixed with 'F', and with dashes converted to underscores. For | 628 | prefixed with 'F', and with dashes converted to underscores. For |