diff options
| author | Glenn Morris | 2013-02-22 09:13:05 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-02-22 09:13:05 -0800 |
| commit | bba90ab24e80476efcad6b6a770fd5fda522a621 (patch) | |
| tree | 73bc6cb08174ab2e568c6cf2f642a73895634ed3 /etc | |
| parent | d78cf5edf9b4aebfc6a5821d88ba1ee3eb00aebb (diff) | |
| parent | cee1a690ee32abe67ef2d43fb9a9ad9f792de405 (diff) | |
| download | emacs-bba90ab24e80476efcad6b6a770fd5fda522a621.tar.gz emacs-bba90ab24e80476efcad6b6a770fd5fda522a621.zip | |
Merge from emacs-24; up to 2012-12-22T02:59:08Z!cyd@gnu.org
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/DEBUG | 33 |
1 files changed, 22 insertions, 11 deletions
| @@ -8,17 +8,28 @@ See the end of the file for license conditions. | |||
| 8 | read the Windows-specific section near the end of this document.] | 8 | read the Windows-specific section near the end of this document.] |
| 9 | 9 | ||
| 10 | ** When you debug Emacs with GDB, you should start it in the directory | 10 | ** When you debug Emacs with GDB, you should start it in the directory |
| 11 | where the executable was made. That directory has a .gdbinit file | 11 | where the executable was made (the 'src' directory in the Emacs source |
| 12 | that defines various "user-defined" commands for debugging Emacs. | 12 | tree). That directory has a .gdbinit file that defines various |
| 13 | (These commands are described below under "Examining Lisp object | 13 | "user-defined" commands for debugging Emacs. (These commands are |
| 14 | values" and "Debugging Emacs Redisplay problems".) | 14 | described below under "Examining Lisp object values" and "Debugging |
| 15 | 15 | Emacs Redisplay problems".) | |
| 16 | ** When you are trying to analyze failed assertions, it will be | 16 | |
| 17 | essential to compile Emacs either completely without optimizations or | 17 | Some GDB versions by default do not automatically load .gdbinit files |
| 18 | at least (when using GCC) with the -fno-crossjumping option. Failure | 18 | in the directory where you invoke GDB. With those versions of GDB, |
| 19 | to do so may make the compiler recycle the same abort call for all | 19 | you will see a warning when GDB starts, like this: |
| 20 | assertions in a given function, rendering the stack backtrace useless | 20 | |
| 21 | for identifying the specific failed assertion. | 21 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". |
| 22 | |||
| 23 | There are several ways to overcome that difficulty, they are all | ||
| 24 | described in the node "Auto-loading safe path" in the GDB user manual. | ||
| 25 | |||
| 26 | ** When you are trying to analyze failed assertions or backtraces, it | ||
| 27 | will be essential to compile Emacs either completely without | ||
| 28 | optimizations (set CFLAGS to "-O0 -g3") or at least (when using GCC) | ||
| 29 | with the -fno-crossjumping option in CFLAGS. Failure to do so may | ||
| 30 | make the compiler recycle the same abort call for all assertions in a | ||
| 31 | given function, rendering the stack backtrace useless for identifying | ||
| 32 | the specific failed assertion. | ||
| 22 | 33 | ||
| 23 | ** It is a good idea to run Emacs under GDB (or some other suitable | 34 | ** It is a good idea to run Emacs under GDB (or some other suitable |
| 24 | debugger) *all the time*. Then, when Emacs crashes, you will be able | 35 | debugger) *all the time*. Then, when Emacs crashes, you will be able |