diff options
| author | Glenn Morris | 2018-05-01 07:50:48 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-05-01 07:50:48 -0700 |
| commit | 62032f699a4969ffacd9b8ea9dccd3ce6b10051f (patch) | |
| tree | 357983c747ff7af985339027113adbc942f0edcd /etc/DEBUG | |
| parent | b3b4697ff8b9093cef2cc3842dab731f37c9e2e1 (diff) | |
| parent | 71be806d01c4e135f067bc842a9d684e594b4f35 (diff) | |
| download | emacs-62032f699a4969ffacd9b8ea9dccd3ce6b10051f.tar.gz emacs-62032f699a4969ffacd9b8ea9dccd3ce6b10051f.zip | |
Merge from origin/emacs-26
71be806 ; * etc/DEBUG: Minor clarification.
4403f89 Update the Emacs FAQ
40b3317 * etc/DEBUG: Minor copyedits.
850ff18 Clarify wording of NS drag n drop documentation
343d70b1 Improve kill-related documentation (bug#31209)
0b43224 * lisp/simple.el (region-extract-function): Don't hide the 'n...
d6e2c59 Fix pre- and post-command-hook errors in term.el
6cf83131e * doc/lispref/display.texi (Glyphless Chars): Fix grammar.
88d178c Fix macOS drag n drop event documentation
Diffstat (limited to 'etc/DEBUG')
| -rw-r--r-- | etc/DEBUG | 23 |
1 files changed, 17 insertions, 6 deletions
| @@ -43,6 +43,11 @@ created in the 'src' directory. | |||
| 43 | 43 | ||
| 44 | *** Configuring GDB | 44 | *** Configuring GDB |
| 45 | 45 | ||
| 46 | To start GDB to debug Emacs, you can simply type "gdb ./emacs RET" at | ||
| 47 | the shell prompt (assuming you do that from the directory of the Emacs | ||
| 48 | executable, usually the 'src' sub-directory of the Emacs tree). | ||
| 49 | However, we recommend starting GDB from Emacs, see below. | ||
| 50 | |||
| 46 | When you debug Emacs with GDB, you should start GDB in the directory | 51 | When you debug Emacs with GDB, you should start GDB in the directory |
| 47 | where the Emacs executable was made (the 'src' directory in the Emacs | 52 | where the Emacs executable was made (the 'src' directory in the Emacs |
| 48 | source tree). That directory has a .gdbinit file that defines various | 53 | source tree). That directory has a .gdbinit file that defines various |
| @@ -52,16 +57,19 @@ Emacs Redisplay problems".) | |||
| 52 | 57 | ||
| 53 | Starting the debugger from Emacs, via the "M-x gdb" command (described | 58 | Starting the debugger from Emacs, via the "M-x gdb" command (described |
| 54 | below), when the current buffer visits one of the Emacs C source files | 59 | below), when the current buffer visits one of the Emacs C source files |
| 55 | will automatically start GDB in the 'src' directory. | 60 | will automatically start GDB in the 'src' directory. If you invoke |
| 61 | "M-x gdb" from a buffer whose default directory is different, such as | ||
| 62 | from the "*scratch*" buffer, you can change the default directory with | ||
| 63 | the "M-x cd" command before starting the debugger. | ||
| 56 | 64 | ||
| 57 | Some GDB versions by default do not automatically load .gdbinit files | 65 | Recent GDB versions by default do not automatically load .gdbinit |
| 58 | in the directory where you invoke GDB. With those versions of GDB, | 66 | files in the directory where you invoke GDB. With those versions of |
| 59 | you will see a warning when GDB starts, like this: | 67 | GDB, you will see a warning when GDB starts, like this: |
| 60 | 68 | ||
| 61 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". | 69 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". |
| 62 | 70 | ||
| 63 | The simplest way to fix this is to add the following line to your | 71 | The simplest way to fix this is to add the following line to your |
| 64 | ~/.gdbinit file: | 72 | ~/.gdbinit file (creating such a file if it doesn't already exist): |
| 65 | 73 | ||
| 66 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit | 74 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit |
| 67 | 75 | ||
| @@ -133,9 +141,12 @@ to the debugger". | |||
| 133 | 141 | ||
| 134 | You are now ready to start your debugging session. | 142 | You are now ready to start your debugging session. |
| 135 | 143 | ||
| 144 | *** Running Emacs from GDB | ||
| 145 | |||
| 136 | If you are starting a new Emacs session, type "run", followed by any | 146 | If you are starting a new Emacs session, type "run", followed by any |
| 137 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and | 147 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and |
| 138 | press RET. | 148 | press RET. If you ran GDB outside of Emacs, type "run" followed by |
| 149 | the command-line arguments at the GDB prompt instead. | ||
| 139 | 150 | ||
| 140 | If you attached the debugger to a running Emacs, type "continue" into | 151 | If you attached the debugger to a running Emacs, type "continue" into |
| 141 | the *gud-emacs* buffer and press RET. | 152 | the *gud-emacs* buffer and press RET. |