From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3480 invoked by alias); 2 Dec 2006 22:15:53 -0000 Received: (qmail 3469 invoked by uid 22791); 2 Dec 2006 22:15:53 -0000 X-Spam-Check-By: sourceware.org Received: from smtp113.sbc.mail.mud.yahoo.com (HELO smtp113.sbc.mail.mud.yahoo.com) (68.142.198.212) by sourceware.org (qpsmtpd/0.31) with SMTP; Sat, 02 Dec 2006 22:15:44 +0000 Received: (qmail 4251 invoked from network); 2 Dec 2006 22:15:43 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.122.56 with login) by smtp113.sbc.mail.mud.yahoo.com with SMTP; 2 Dec 2006 22:15:42 -0000 X-YMail-OSG: 5a7V6ooVM1k923bkczVlveoj4d34B6uNqPnamT8aUhg9U.IJ5mgJQ3GfNfRYyQ7fQZ.cBPjFU_4KDIPhBK_oSJARdpeuZcVMJWS4MpleryAtlmp4D2v5qA-- Received: by lucon.org (Postfix, from userid 500) id 3FDDD46EEAA; Sat, 2 Dec 2006 14:15:41 -0800 (PST) Date: Sat, 02 Dec 2006 22:15:00 -0000 From: "H. J. Lu" To: Chet Ramey Cc: GDB , jkratoch@redhat.com, bug-readline@gnu.org, chet@case.edu Subject: Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list Message-ID: <20061202221541.GA9776@lucon.org> References: <20061121213205.GA13310@lucon.org> <20061128164658.GB20882@nevyn.them.org> <20061128165844.GA13667@lucon.org> <20061202184344.GA2197@lucon.org> <4571CF2A.3040608@case.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4571CF2A.3040608@case.edu> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00015.txt.bz2 On Sat, Dec 02, 2006 at 02:08:26PM -0500, Chet Ramey wrote: > H. J. Lu wrote: > > >>> I'm pretty sure this isn't right. I got as far as figuring out that we > >>> should be calling rl_callback_handler_install and > >>> rl_callback_handler_remove at different times, always removing the > >>> handler before calling readline recursively, but I couldn't quite work > >>> out the right conditions. > >> I assume by "this isn't right", you mean my patch may break something. > >> Do you have a testcase? It may get into readline: > > Unless the calling application is careful, this code will leave readline > in an inconsistent state in the presence of a longjmp(). It relies on > private state kept local to a single call to readline(). > > I am leaning towards not including it for that reason. > > There should be no reason that the application cannot remove the callback > handler and re-add it before calling readline synchronously, as Daniel or > H.J. suggested. The application is the only one in a position to know > which is right. > Did you mean http://sources.redhat.com/ml/gdb-patches/2006-11/msg00234.html is more appropriate? H.J.