aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-08-07 16:38:02 +0300
committerEli Zaretskii2025-08-07 16:38:02 +0300
commite9fe0ebae057bd9e9015a16b9b3604a5ceddc0ea (patch)
tree1d1ecc1ef2aaf265dfb8476672e629b03683992a
parentcaa6bc95c1b5904bd50c6aee5c70c6994594756c (diff)
downloademacs-e9fe0ebae057bd9e9015a16b9b3604a5ceddc0ea.tar.gz
emacs-e9fe0ebae057bd9e9015a16b9b3604a5ceddc0ea.zip
; Fix last change
* src/eval.c (Fdebugger_trap): Minor wording changes in doc string. * etc/DEBUG: Some copyedits of a recently-added text.
-rw-r--r--etc/DEBUG21
-rw-r--r--src/eval.c12
2 files changed, 18 insertions, 15 deletions
diff --git a/etc/DEBUG b/etc/DEBUG
index 44f19900c64..dc1601a34f8 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -211,16 +211,19 @@ the debugger, but before running it, is the most efficient way of
211making sure control will be returned to the debugger when you need 211making sure control will be returned to the debugger when you need
212that. 212that.
213 213
214There is a default function to give control to the debugger. It is 214The function 'debugger-trap' is a do-nothing interactive command that
215called debugger-trap. This is a do-nothing primitive, as a convenient 215exists to give control to the debugger. It is convenient to set a
216point to return control to the debugger. You can invoke interactively 216breakpoint there to give control to the debugger when the function is
217with "M-x debugger-trap RET". The src/.gdbinit file in the Emacs source 217called. You can invoke it interactively with "M-x debugger-trap RET".
218distribution sets a breakpoint on this function. 218The src/.gdbinit file in the Emacs source distribution sets a breakpoint
219 219in this function, so if you arrange for .gdbinit to be loaded, or load
220'Fsignal' is a very useful place to put a breakpoint in. All Lisp 220it manually in a debugging session, the breakpoint is set for you
221automatically.
222
223'Fsignal' is another very useful place to put a breakpoint in. All Lisp
221errors go through there. If you are only interested in errors that 224errors go through there. If you are only interested in errors that
222would fire the Lisp debugger, breaking at 'maybe_call_debugger' is 225would fire the Lisp debugger, breaking at 'maybe_call_debugger' is a
223useful. 226useful alternative.
224 227
225It is also useful to have a guaranteed way to return to the debugger 228It is also useful to have a guaranteed way to return to the debugger
226at any arbitrary time. When using X, this is easy: type C-z at the 229at any arbitrary time. When using X, this is easy: type C-z at the
diff --git a/src/eval.c b/src/eval.c
index 829d6104618..0d4ae91136e 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3092,14 +3092,14 @@ FUNCTIONP (Lisp_Object object)
3092} 3092}
3093 3093
3094DEFUN ("debugger-trap", Fdebugger_trap, Sdebugger_trap, 0, 0, "", 3094DEFUN ("debugger-trap", Fdebugger_trap, Sdebugger_trap, 0, 0, "",
3095 doc: /* Trap execution flow and hand over control to GDB. 3095 doc: /* Stop Emacs and hand over control to GDB.
3096The Emacs source file src/.gdbinit uses this via the GDB command 3096The Emacs source file src/.gdbinit sets a breakpoint in this function.
3097"break Fdebugger_trap".
3098 3097
3099This function has no effect. It is reserved for debugging, and is not 3098This function does nothing. It is not called by Emacs otherwise, and
3100called by Emacs otherwise. 3099exists so that calling it or invoking it interactively will cause
3100GDB to kick in.
3101 3101
3102For Lisp debugging see debug, as well as edebug, in the manual: 3102For Lisp debugging see `debug', as well as `edebug', in the manual:
3103"(elisp) Debugging". */) 3103"(elisp) Debugging". */)
3104 (void) 3104 (void)
3105{ 3105{