From patchwork Tue Nov 12 00:00:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 35816 Received: (qmail 106981 invoked by alias); 12 Nov 2019 00:01:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 105961 invoked by uid 89); 12 Nov 2019 00:00:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=associates, Emacs, Keys, gdb-command X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Nov 2019 00:00:25 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id EEFC32046F; Mon, 11 Nov 2019 19:00:10 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 30A7C2048C; Mon, 11 Nov 2019 19:00:09 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 212B220AF6; Mon, 11 Nov 2019 19:00:09 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Mon, 11 Nov 2019 19:00:07 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: newpatchset Subject: [pushed] Document and extend readline-bindable functions X-Gerrit-Change-Id: I2233779b7aefe372f19bd03c8f325733c3385e72 X-Gerrit-Change-Number: 603 X-Gerrit-ChangeURL: X-Gerrit-Commit: c86d74cc7d442414a62752187aa10f49f0ac0de7 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-76-gf8b6da0ab5 Message-Id: <20191112000009.212B220AF6@gnutoolchain-gerrit.osci.io> The original change was created by Tom Tromey. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/603 ...................................................................... Document and extend readline-bindable functions This adds readline-bindable function names to a few gdb functions that already had key bindings. This lets users change the bindings. This also removes the gdb-command function. Due to how this function is implemented, it doesn't make sense to allow binding it. Finally, this updates the documentation to reflect these changes. gdb/ChangeLog 2019-11-11 Tom Tromey * tui/tui.c (tui_initialize_readline): Add new bindable readline functions. gdb/doc/ChangeLog 2019-11-11 Tom Tromey * gdb.texinfo (TUI Keys): Document readline function names. Change-Id: I2233779b7aefe372f19bd03c8f325733c3385e72 --- M gdb/ChangeLog M gdb/doc/ChangeLog M gdb/doc/gdb.texinfo M gdb/tui/tui.c 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index edd3e90..e8104f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-11-11 Tom Tromey + + * tui/tui.c (tui_initialize_readline): Add new bindable readline + functions. + 2019-11-11 Christian Biesinger * nat/linux-osdata.c (user_from_uid): Use getpwuid_r. diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 3c77d4f..0da4c9d 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,9 @@ 2019-11-11 Tom Tromey + * gdb.texinfo (TUI Keys): Document readline function names. + +2019-11-11 Tom Tromey + * gdb.texinfo (Editing): Document operate-and-get-next. 2019-11-11 Tom Tromey diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 05accca..398167f 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -27621,6 +27621,9 @@ the TUI mode, control is given back to the curses windows. The screen is then refreshed. +This key binding uses the bindable Readline function +@code{tui-switch-mode}. + @kindex C-x 1 @item C-x 1 Use a TUI layout with only one window. The layout will @@ -27629,6 +27632,9 @@ Think of this key binding as the Emacs @kbd{C-x 1} binding. +This key binding uses the bindable Readline function +@code{tui-delete-other-windows}. + @kindex C-x 2 @item C-x 2 Use a TUI layout with at least two windows. When the current @@ -27638,6 +27644,9 @@ Think of it as the Emacs @kbd{C-x 2} binding. +This key binding uses the bindable Readline function +@code{tui-change-windows}. + @kindex C-x o @item C-x o Change the active window. The TUI associates several key bindings @@ -27646,10 +27655,16 @@ Think of it as the Emacs @kbd{C-x o} binding. +This key binding uses the bindable Readline function +@code{tui-other-window}. + @kindex C-x s @item C-x s Switch in and out of the TUI SingleKey mode that binds single keys to @value{GDBN} commands (@pxref{TUI Single Key Mode}). + +This key binding uses the bindable Readline function +@code{next-keymap}. @end table The following key bindings only work in the TUI mode: diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index 1568351..3f5ab41 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -330,8 +330,10 @@ Keymap tui_ctlx_keymap; rl_add_defun ("tui-switch-mode", tui_rl_switch_mode, -1); - rl_add_defun ("gdb-command", tui_rl_command_key, -1); rl_add_defun ("next-keymap", tui_rl_next_keymap, -1); + rl_add_defun ("tui-delete-other-windows", tui_rl_delete_other_windows, -1); + rl_add_defun ("tui-change-windows", tui_rl_change_windows, -1); + rl_add_defun ("tui-other-window", tui_rl_other_window, -1); tui_keymap = rl_make_bare_keymap ();