aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-22 11:22:21 +0200
committerEli Zaretskii2013-02-22 11:22:21 +0200
commit83c54ddf38dd70e2f8673b4928ee6c5f4030bdbf (patch)
treed9ff655fa3daacba0751e40776aa0b7a9671cbad
parent6800ff8d3a1da03281ad026729eadd036b49d2a9 (diff)
downloademacs-83c54ddf38dd70e2f8673b4928ee6c5f4030bdbf.tar.gz
emacs-83c54ddf38dd70e2f8673b4928ee6c5f4030bdbf.zip
Improve instructions in etc/DEBUG, per bug #13775.
-rw-r--r--etc/DEBUG33
1 files changed, 22 insertions, 11 deletions
diff --git a/etc/DEBUG b/etc/DEBUG
index 6cd0abeeaa5..709e8987d03 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -8,17 +8,28 @@ See the end of the file for license conditions.
8read the Windows-specific section near the end of this document.] 8read 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
11where the executable was made. That directory has a .gdbinit file 11where the executable was made (the 'src' directory in the Emacs source
12that defines various "user-defined" commands for debugging Emacs. 12tree). 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
14values" and "Debugging Emacs Redisplay problems".) 14described below under "Examining Lisp object values" and "Debugging
15 15Emacs Redisplay problems".)
16** When you are trying to analyze failed assertions, it will be 16
17essential to compile Emacs either completely without optimizations or 17Some GDB versions by default do not automatically load .gdbinit files
18at least (when using GCC) with the -fno-crossjumping option. Failure 18in the directory where you invoke GDB. With those versions of GDB,
19to do so may make the compiler recycle the same abort call for all 19you will see a warning when GDB starts, like this:
20assertions in a given function, rendering the stack backtrace useless 20
21for 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
23There are several ways to overcome that difficulty, they are all
24described 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
27will be essential to compile Emacs either completely without
28optimizations (set CFLAGS to "-O0 -g3") or at least (when using GCC)
29with the -fno-crossjumping option in CFLAGS. Failure to do so may
30make the compiler recycle the same abort call for all assertions in a
31given function, rendering the stack backtrace useless for identifying
32the 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
24debugger) *all the time*. Then, when Emacs crashes, you will be able 35debugger) *all the time*. Then, when Emacs crashes, you will be able