diff options
| author | Yuan Fu | 2020-04-06 09:56:15 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2020-04-06 09:56:15 +0200 |
| commit | fd4ee361395060c8afa95393245ac8d51655ae54 (patch) | |
| tree | 7fb6cc73f0792261e9ea4bf16cc2302d9fbbbd44 /etc | |
| parent | 981cea9b624f61de3bc84226d19303ff3f8cbd8b (diff) | |
| download | emacs-fd4ee361395060c8afa95393245ac8d51655ae54.tar.gz emacs-fd4ee361395060c8afa95393245ac8d51655ae54.zip | |
Unify and improve gdb-mi source buffer display logic
Unify the behavior of source buffer display for gdb-mi. Before this
change, stepping and other gdb command handlers use 'gud-display-line',
and 'gdb-goto-breakpoint' uses 'gdb-display-source-buffer'. Now whenever
gdb-mi code tries to open a source buffer, 'gdb-display-source-buffer'
is used. Also, simplify the logic in 'gdb-display-source-buffer' and
add a feature to limit the maximum number of source windows.
* doc/emacs/building.texi (GDB User Interface Layout): Explain source
file display in GDB.
* etc/NEWS (gdb-mi): Add news about source display.
* lisp/progmodes/gdb-mi.el (gdb-source-window): Remove variable,
change to 'gdb-source-window-list'.
(gdb-source-window-list): New variable.
(gdb-display-source-buffer-action,
gdb-max-source-window-count): New options.
(gdb-init-1, gdb-setup-windows, gdb-load-window-configuration,
gdb-restore-windows): Use 'gdb-source-window' rather than
'gdb-source-window-list'.
(gdb-save-window-configuration): Use 'gdb-source-window' rather than
'gdb-source-window-list'. And consider any buffer that is not a
command or function buffer as a source buffer.
(gdb-display-source-buffer): Use new logic.
(gdb-goto-breakpoint): Remove 'display-buffer' call
and don't set 'gdb-source-buffer' anymore.
* lisp/progmodes/gud.el (gud-display-line): If used by gdb-mi, use
'gdb-display-source-buffer' rather than 'display-buffer'. Don't set
'gdb-source-buffer' anymore.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -233,6 +233,12 @@ will remember the window configuration before GDB started and restore | |||
| 233 | it after GDB quits. A toggle button is also provided under 'Gud -- | 233 | it after GDB quits. A toggle button is also provided under 'Gud -- |
| 234 | GDB-Windows'. | 234 | GDB-Windows'. |
| 235 | 235 | ||
| 236 | +++ | ||
| 237 | *** gdb-mi now has a better logic for displaying source buffers | ||
| 238 | Now GDB only uses one source window to display source file by default. | ||
| 239 | Customize 'gdb-max-source-window-count' to use more than one window. | ||
| 240 | Control source file display by 'gdb-display-source-buffer-action'. | ||
| 241 | |||
| 236 | ** Gravatar | 242 | ** Gravatar |
| 237 | 243 | ||
| 238 | --- | 244 | --- |