diff options
| author | Eli Zaretskii | 2025-08-07 16:38:02 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-08-07 16:38:02 +0300 |
| commit | e9fe0ebae057bd9e9015a16b9b3604a5ceddc0ea (patch) | |
| tree | 1d1ecc1ef2aaf265dfb8476672e629b03683992a | |
| parent | caa6bc95c1b5904bd50c6aee5c70c6994594756c (diff) | |
| download | emacs-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/DEBUG | 21 | ||||
| -rw-r--r-- | src/eval.c | 12 |
2 files changed, 18 insertions, 15 deletions
| @@ -211,16 +211,19 @@ the debugger, but before running it, is the most efficient way of | |||
| 211 | making sure control will be returned to the debugger when you need | 211 | making sure control will be returned to the debugger when you need |
| 212 | that. | 212 | that. |
| 213 | 213 | ||
| 214 | There is a default function to give control to the debugger. It is | 214 | The function 'debugger-trap' is a do-nothing interactive command that |
| 215 | called debugger-trap. This is a do-nothing primitive, as a convenient | 215 | exists to give control to the debugger. It is convenient to set a |
| 216 | point to return control to the debugger. You can invoke interactively | 216 | breakpoint there to give control to the debugger when the function is |
| 217 | with "M-x debugger-trap RET". The src/.gdbinit file in the Emacs source | 217 | called. You can invoke it interactively with "M-x debugger-trap RET". |
| 218 | distribution sets a breakpoint on this function. | 218 | The src/.gdbinit file in the Emacs source distribution sets a breakpoint |
| 219 | 219 | in 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 | 220 | it manually in a debugging session, the breakpoint is set for you |
| 221 | automatically. | ||
| 222 | |||
| 223 | 'Fsignal' is another very useful place to put a breakpoint in. All Lisp | ||
| 221 | errors go through there. If you are only interested in errors that | 224 | errors go through there. If you are only interested in errors that |
| 222 | would fire the Lisp debugger, breaking at 'maybe_call_debugger' is | 225 | would fire the Lisp debugger, breaking at 'maybe_call_debugger' is a |
| 223 | useful. | 226 | useful alternative. |
| 224 | 227 | ||
| 225 | It is also useful to have a guaranteed way to return to the debugger | 228 | It is also useful to have a guaranteed way to return to the debugger |
| 226 | at any arbitrary time. When using X, this is easy: type C-z at the | 229 | at 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 | ||
| 3094 | DEFUN ("debugger-trap", Fdebugger_trap, Sdebugger_trap, 0, 0, "", | 3094 | DEFUN ("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. |
| 3096 | The Emacs source file src/.gdbinit uses this via the GDB command | 3096 | The Emacs source file src/.gdbinit sets a breakpoint in this function. |
| 3097 | "break Fdebugger_trap". | ||
| 3098 | 3097 | ||
| 3099 | This function has no effect. It is reserved for debugging, and is not | 3098 | This function does nothing. It is not called by Emacs otherwise, and |
| 3100 | called by Emacs otherwise. | 3099 | exists so that calling it or invoking it interactively will cause |
| 3100 | GDB to kick in. | ||
| 3101 | 3101 | ||
| 3102 | For Lisp debugging see debug, as well as edebug, in the manual: | 3102 | For Lisp debugging see `debug', as well as `edebug', in the manual: |
| 3103 | "(elisp) Debugging". */) | 3103 | "(elisp) Debugging". */) |
| 3104 | (void) | 3104 | (void) |
| 3105 | { | 3105 | { |