aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-07 18:32:00 +0200
committerEli Zaretskii2015-12-07 18:32:00 +0200
commitf366f23624d9c571a9203c23d73cd5a2b141483f (patch)
treedad08e4fc8d215f37160427c305101a2a48e5632
parent86130adf1ef6ca8e8feabcc0fe966f84bf5d42dc (diff)
downloademacs-f366f23624d9c571a9203c23d73cd5a2b141483f.tar.gz
emacs-f366f23624d9c571a9203c23d73cd5a2b141483f.zip
; * etc/DEBUG: Improve newbie instructions. Fix a typo.
-rw-r--r--etc/DEBUG21
1 files changed, 17 insertions, 4 deletions
diff --git a/etc/DEBUG b/etc/DEBUG
index 55102d3d991..be6d9ec3513 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -143,9 +143,16 @@ Many variables you will encounter while debugging are Lisp objects.
143These are displayed as integer values (or structures, if you used the 143These are displayed as integer values (or structures, if you used the
144"--enable-check-lisp-object-type" option at configure time) that are 144"--enable-check-lisp-object-type" option at configure time) that are
145hard to interpret, especially if they represent long lists. You can 145hard to interpret, especially if they represent long lists. You can
146use the 'pp' command to display them in their Lisp form. Additional 146use the 'pp' command to display them in their Lisp form. That command
147information about displaying Lisp objects can be found under 147displays its output on the standard error stream (on GNU/Linux, you
148"Examining Lisp object values" below. 148can redirect that to a file using "M-x redirect-debugging-output").
149This means that if you attach GDB to a running Emacs that was invoked
150from a desktop icon, chances are you will not see the output at all,
151or it will wind up in an obscure place (check the documentation of
152your desktop environment).
153
154Additional information about displaying Lisp objects can be found
155under "Examining Lisp object values" below.
149 156
150The rest of this document describes specific useful techniques for 157The rest of this document describes specific useful techniques for
151debugging Emacs; we suggest reading it in its entirety the first time 158debugging Emacs; we suggest reading it in its entirety the first time
@@ -240,6 +247,12 @@ You can also use 'pp value' to print the emacs value directly.
240 247
241To see the current value of a Lisp Variable, use 'pv variable'. 248To see the current value of a Lisp Variable, use 'pv variable'.
242 249
250These commands send their output to stderr; if that is closed or
251redirected to some file you don't know, you won't see their output.
252This is particularly so for Emacs invoked on MS-Windows from the
253desktop shortcut. On GNU/Linux, you can use the command
254'redirect-debugging-output' to redirect stderr to a file.
255
243Note: It is not a good idea to try 'pr', 'pp', or 'pv' if you know that Emacs 256Note: It is not a good idea to try 'pr', 'pp', or 'pv' if you know that Emacs
244is in deep trouble: its stack smashed (e.g., if it encountered SIGSEGV 257is in deep trouble: its stack smashed (e.g., if it encountered SIGSEGV
245due to stack overflow), or crucial data structures, such as 'obarray', 258due to stack overflow), or crucial data structures, such as 'obarray',
@@ -310,7 +323,7 @@ Then Emacs hits the breakpoint:
310 [...] 323 [...]
311 } 324 }
312 325
313Now we can use 'pr' to print the frame parameters: 326Now we can use 'pp' to print the frame parameters:
314 327
315 (gdb) pp $->param_alist 328 (gdb) pp $->param_alist
316 ((background-mode . light) (display-type . color) [...]) 329 ((background-mode . light) (display-type . color) [...])