From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28516 invoked by alias); 20 Apr 2004 16:48:00 -0000 Mailing-List: contact gdb-prs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sources.redhat.com Received: (qmail 28498 invoked by uid 71); 20 Apr 2004 16:48:00 -0000 Resent-Date: 20 Apr 2004 16:48:00 -0000 Resent-Message-ID: <20040420164800.28497.qmail@sources.redhat.com> Resent-From: gdb-gnats@sources.redhat.com (GNATS Filer) Resent-To: nobody@sources.redhat.com Resent-Cc: gdb-prs@sources.redhat.com Resent-Reply-To: gdb-gnats@sources.redhat.com, dick.streefland@altium.nl Received: (qmail 21800 invoked by uid 48); 20 Apr 2004 16:43:30 -0000 Message-Id: <20040420164330.21797.qmail@sources.redhat.com> Date: Tue, 20 Apr 2004 16:48:00 -0000 From: dick.streefland@altium.nl Reply-To: dick.streefland@altium.nl To: gdb-gnats@sources.redhat.com X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: cli/1616: readline macro expansion doesn't work correctly X-SW-Source: 2004-q2/txt/msg00030.txt.bz2 List-Id: >Number: 1616 >Category: cli >Synopsis: readline macro expansion doesn't work correctly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Apr 20 16:48:00 UTC 2004 >Closed-Date: >Last-Modified: >Originator: dick.streefland@altium.nl >Release: gdb-6.1 >Organization: >Environment: Debian sarge. Gdb is dynamically linked against libreadline.so.4, but the readline version included in the source distribution shows the same behavior. >Description: A readline macro doesn't expand until you press another key. The macro buffer is not read until the next input event. >How-To-Repeat: Define the following macro in your ~/.inputrc: "\C-A": "ABC" Start gdb, and press control-A. The macro expansion "ABC" will not appear. Now press another key, and the "ABC" appears. >Fix: The attached patch fixes the problem for me, but perhaps this needs to be fixed in readline instead? >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="gdb-6.1-macro.diff" Content-Disposition: inline; filename="gdb-6.1-macro.diff" --- gdb-6.1/gdb/event-top.c.orig 2004-02-28 19:04:36.000000000 +0100 +++ gdb-6.1/gdb/event-top.c 2004-04-20 17:54:46.000000000 +0200 @@ -164,6 +164,12 @@ static void rl_callback_read_char_wrapper (gdb_client_data client_data) { rl_callback_read_char (); + while (rl_executing_macro) + { + immediate_quit++; + rl_callback_read_char (); + immediate_quit--; + } if (after_char_processing_hook) (*after_char_processing_hook) (); }