diff options
| author | Eli Zaretskii | 2018-04-28 14:28:24 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-04-28 14:28:24 +0300 |
| commit | 40b3317046fc527e3e3d266a8a51f9cf057aa6be (patch) | |
| tree | 0b60500453ac2826f7020501263f1670daf9aefc | |
| parent | 850ff18016a9ad64322b6635f28fe1d29283d93a (diff) | |
| download | emacs-40b3317046fc527e3e3d266a8a51f9cf057aa6be.tar.gz emacs-40b3317046fc527e3e3d266a8a51f9cf057aa6be.zip | |
* etc/DEBUG: Minor copyedits.
| -rw-r--r-- | etc/DEBUG | 21 |
1 files changed, 15 insertions, 6 deletions
| @@ -42,6 +42,9 @@ created in the 'src' directory. | |||
| 42 | 42 | ||
| 43 | *** Configuring GDB | 43 | *** Configuring GDB |
| 44 | 44 | ||
| 45 | To start GDB, you can simply type "gdb RET" at the shell prompt. | ||
| 46 | However, we recommend starting GDB from Emacs, see below. | ||
| 47 | |||
| 45 | When you debug Emacs with GDB, you should start GDB in the directory | 48 | When you debug Emacs with GDB, you should start GDB in the directory |
| 46 | where the Emacs executable was made (the 'src' directory in the Emacs | 49 | where the Emacs executable was made (the 'src' directory in the Emacs |
| 47 | source tree). That directory has a .gdbinit file that defines various | 50 | source tree). That directory has a .gdbinit file that defines various |
| @@ -51,16 +54,19 @@ Emacs Redisplay problems".) | |||
| 51 | 54 | ||
| 52 | Starting the debugger from Emacs, via the "M-x gdb" command (described | 55 | Starting the debugger from Emacs, via the "M-x gdb" command (described |
| 53 | below), when the current buffer visits one of the Emacs C source files | 56 | below), when the current buffer visits one of the Emacs C source files |
| 54 | will automatically start GDB in the 'src' directory. | 57 | will automatically start GDB in the 'src' directory. If you invoke |
| 58 | "M-x gdb" from a buffer whose default directory is different, such as | ||
| 59 | from the "*scratch*" buffer, you can change the default directory with | ||
| 60 | the "M-x cd" command before starting the debugger. | ||
| 55 | 61 | ||
| 56 | Some GDB versions by default do not automatically load .gdbinit files | 62 | Recent GDB versions by default do not automatically load .gdbinit |
| 57 | in the directory where you invoke GDB. With those versions of GDB, | 63 | files in the directory where you invoke GDB. With those versions of |
| 58 | you will see a warning when GDB starts, like this: | 64 | GDB, you will see a warning when GDB starts, like this: |
| 59 | 65 | ||
| 60 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". | 66 | warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". |
| 61 | 67 | ||
| 62 | The simplest way to fix this is to add the following line to your | 68 | The simplest way to fix this is to add the following line to your |
| 63 | ~/.gdbinit file: | 69 | ~/.gdbinit file (creating such a file if it doesn't already exist): |
| 64 | 70 | ||
| 65 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit | 71 | add-auto-load-safe-path /path/to/emacs/src/.gdbinit |
| 66 | 72 | ||
| @@ -132,9 +138,12 @@ to the debugger". | |||
| 132 | 138 | ||
| 133 | You are now ready to start your debugging session. | 139 | You are now ready to start your debugging session. |
| 134 | 140 | ||
| 141 | *** Running Emacs from GDB | ||
| 142 | |||
| 135 | If you are starting a new Emacs session, type "run", followed by any | 143 | If you are starting a new Emacs session, type "run", followed by any |
| 136 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and | 144 | command-line arguments (e.g., "-Q") into the *gud-emacs* buffer and |
| 137 | press RET. | 145 | press RET. If you ran GDB outside of Emacs, type "run" followed by |
| 146 | the command-line arguments at the GDB prompt instead. | ||
| 138 | 147 | ||
| 139 | If you attached the debugger to a running Emacs, type "continue" into | 148 | If you attached the debugger to a running Emacs, type "continue" into |
| 140 | the *gud-emacs* buffer and press RET. | 149 | the *gud-emacs* buffer and press RET. |