This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb and binutils branch master updated. d64e57faa89ba4de0ebacdc30fbee5d19310950c

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  d64e57faa89ba4de0ebacdc30fbee5d19310950c (commit)
      from  6f9d33d89858fce0278af93658fcaef8d76f33cb (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 -----------------------------------------------------------------;h=d64e57faa89ba4de0ebacdc30fbee5d19310950c

commit d64e57faa89ba4de0ebacdc30fbee5d19310950c
Author: Patrick Palka <>
Date:   Sun Nov 23 14:03:39 2014 +0400

    Fix the processing of Meta-key commands in TUI
    This patch fixes the annoying bug where key sequences such as Alt_F or
    Alt_B (go forward or backwards by a word) do not behave promptly in TUI.
    You have to press a third key in order for the key sequence to register.
    This is mostly ncurses' fault.  Calling wgetch() normally causes ncurses
    to read only a single key from stdin.  However if the key read is the
    start-sequence key (^[ a.k.a. ESC) then wgetch() reads TWO keys from
    stdin, storing the 2nd key into an internal FIFO buffer and returning
    the start-sequence key.  The extraneous read of the 2nd key makes us
    miss its corresponding stdin event, so the event loop blocks until a
    third key is pressed.  This explains why such key sequences do not
    behave promptly in TUI.
    To fix this issue, we must somehow compensate for the missed stdin event
    corresponding to the 2nd byte of a key sequence.  This patch achieves
    this by hacking  up the stdin event handler to conditionally execute the
    readline callback multiple times in a row.  This is done via a new
    global variable, call_stdin_event_handler_again_p, which is set from
    tui_getc() when we receive a start-sequence key and notice extra pending
    input in the ncurses buffer.
    Tested on x86_64-unknown-linux-gnu.
    	* event-top.h (call_stdin_event_handler_again_p): Declare.
    	* event-top.c (call_stdin_event_handler_again_p): Define.
    	(stdin_event_handler): Use it.
    	* tui/tui-io.c (tui_getc): Prepare to call the stdin event
    	handler again if there is pending input following a
    	start sequence.


Summary of changes:
 gdb/ChangeLog    |    9 +++++++++
 gdb/event-top.c  |   13 ++++++++++++-
 gdb/event-top.h  |    1 +
 gdb/tui/tui-io.c |   28 +++++++++++++++++++++++++++-
 4 files changed, 49 insertions(+), 2 deletions(-)

gdb and binutils

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]