This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. 588dcc3edbde19f90e76de969dbfa7ab3e17951a
- From: ppalka at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 9 Jan 2015 18:30:15 -0000
- Subject: gdb and binutils branch master updated. 588dcc3edbde19f90e76de969dbfa7ab3e17951a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via 588dcc3edbde19f90e76de969dbfa7ab3e17951a (commit)
from ede9f622af1f2634c1227a3ed5f5ea44929573d2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=588dcc3edbde19f90e76de969dbfa7ab3e17951a
commit 588dcc3edbde19f90e76de969dbfa7ab3e17951a
Author: Patrick Palka <patrick@parcs.ath.cx>
Date: Fri Jan 9 13:27:56 2015 -0500
Consolidate the custom TUI query hook with the default query hook
This patch primarily rewrites defaulted_query() to use
gdb_readline_wrapper() to prompt the user for input, like
prompt_for_continue() does. The motivation for this rewrite is to be
able to reuse the default query hook in TUI, obviating the need for a
custom TUI query hook.
However, having TUI use the default query mechanism exposed a couple of
latent bugs in tui_redisplay_readline() related to the handling of
multi-line prompts, in particular GDB's multi-line quit prompt.
The first issue is an off-by-one error in the calculation of the height
of the prompt. The check in question should be col <= prev_col, not c <
prev_col, to properly account for the case when a prompt contains
multiple consecutive newlines. Failing to do so makes TUI have the
wrong idea of the vertical height of the prompt. This patch fixes the
column check.
The second issue is that cur_line does not get updated to reflect the
cursor position if the user's prompt cursor is at the end of the prompt
(i.e. if rl_point == rl_end). cur_line only gets updated if rl_point
lies between 0..rl_end-1 because that is the bounds of the for loop
responsible for updating cur_line. This patch changes the loop's bounds
to 0..rl_end so that cur_line always gets updated.
With these two bug fixes out of the way, the default query mechanism
works well in TUI even with multi-line prompts like GDB's quit prompt.
gdb/ChangeLog:
* utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
to prompt for input.
* tui/tui-hooks.c (tui_query_hook): Remove.
(tui_install_hooks): Don't set deprecated_query_hook.
* tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
height calculation. Always update the command window's cur_line.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 9 +++++++
gdb/tui/tui-hooks.c | 64 ---------------------------------------------------
gdb/tui/tui-io.c | 9 ++++--
gdb/utils.c | 61 +++++++++++-------------------------------------
4 files changed, 29 insertions(+), 114 deletions(-)
hooks/post-receive
--
gdb and binutils