aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorYuan Fu2020-04-06 09:56:15 +0200
committerMartin Rudalics2020-04-06 09:56:15 +0200
commitfd4ee361395060c8afa95393245ac8d51655ae54 (patch)
tree7fb6cc73f0792261e9ea4bf16cc2302d9fbbbd44 /doc
parent981cea9b624f61de3bc84226d19303ff3f8cbd8b (diff)
downloademacs-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 'doc')
-rw-r--r--doc/emacs/building.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 8a05680c742..77a0e807c2b 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1022,6 +1022,14 @@ is the relevant buffer type, such as @samp{breakpoints}. You can do
1022the same with the menu bar, with the @samp{GDB-Windows} and 1022the same with the menu bar, with the @samp{GDB-Windows} and
1023@samp{GDB-Frames} sub-menus of the @samp{GUD} menu. 1023@samp{GDB-Frames} sub-menus of the @samp{GUD} menu.
1024 1024
1025@vindex gdb-max-source-window-count
1026@vindex gdb-display-source-buffer-action
1027By default, GDB uses at most one window to display the source file.
1028You can make it use more windows by customizing
1029@code{gdb-max-source-window-count}. You can also customize
1030@code{gdb-display-source-buffer-action} to control how GDB displays
1031source files.
1032
1025 When you finish debugging, kill the GUD interaction buffer with 1033 When you finish debugging, kill the GUD interaction buffer with
1026@kbd{C-x k}, which will also kill all the buffers associated with the 1034@kbd{C-x k}, which will also kill all the buffers associated with the
1027session. However you need not do this if, after editing and 1035session. However you need not do this if, after editing and