public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: cli/1616: readline macro expansion doesn't work correctly
@ 2008-07-26 21:54 tromey
  0 siblings, 0 replies; 4+ messages in thread
From: tromey @ 2008-07-26 21:54 UTC (permalink / raw)
  To: dick.streefland, gdb-prs, nobody

Synopsis: readline macro expansion doesn't work correctly

State-Changed-From-To: analyzed->closed
State-Changed-By: tromey
State-Changed-When: Sat Jul 26 21:54:29 2008
State-Changed-Why:
    I tried this using the F8 gdb, based on gdb 6.6.
    It worked for me.
    So, I think this readline bug has been fixed.

http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1616


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cli/1616: readline macro expansion doesn't work correctly
@ 2005-10-24 17:05 jimb
  0 siblings, 0 replies; 4+ messages in thread
From: jimb @ 2005-10-24 17:05 UTC (permalink / raw)
  To: dick.streefland, gdb-prs, nobody

Synopsis: readline macro expansion doesn't work correctly

State-Changed-From-To: open->analyzed
State-Changed-By: jimb
State-Changed-When: Mon Oct 24 17:05:58 2005
State-Changed-Why:
    This patch doesn't look right.  If readline has seen the complete key sequence to invoke the keyboard macro, it should immediately run the macro, and update the line on the screen.  GDB shouldn't have to call rl_callback_read_char again.
    
    I think GDB is using the readline interface correctly; it's readline that has the bug.

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=1616


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cli/1616: readline macro expansion doesn't work correctly
@ 2005-10-24 14:08 Dick Streefland
  0 siblings, 0 replies; 4+ messages in thread
From: Dick Streefland @ 2005-10-24 14:08 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR cli/1616; it has been noted by GNATS.

From: Dick Streefland <dick.streefland@altium.nl>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: cli/1616: readline macro expansion doesn't work correctly
Date: Mon, 24 Oct 2005 15:57:51 +0200

 This problem is still present in gdb-6.3. Is there a reason why
 the proposed patch should not be applied?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* cli/1616: readline macro expansion doesn't work correctly
@ 2004-04-20 16:48 dick.streefland
  0 siblings, 0 replies; 4+ messages in thread
From: dick.streefland @ 2004-04-20 16:48 UTC (permalink / raw)
  To: gdb-gnats


>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) ();
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-26 21:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-26 21:54 cli/1616: readline macro expansion doesn't work correctly tromey
  -- strict thread matches above, loose matches on Subject: below --
2005-10-24 17:05 jimb
2005-10-24 14:08 Dick Streefland
2004-04-20 16:48 dick.streefland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).