From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17738 invoked by alias); 2 Dec 2006 19:09:25 -0000 Received: (qmail 17709 invoked by uid 22791); 2 Dec 2006 19:09:16 -0000 X-Spam-Check-By: sourceware.org Received: from mpspam5.TIS.CWRU.Edu (HELO mpspam5.TIS.cwru.edu) (129.22.104.192) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 02 Dec 2006 19:08:53 +0000 Received: from [192.168.1.101] ([71.31.155.76]) by mpspam5.TIS.cwru.edu (MOS 3.8.2-GA) with ESMTP id ADC84916 (AUTH cpr); Sat, 2 Dec 2006 14:08:28 -0500 (EST) Message-ID: <4571CF2A.3040608@case.edu> Date: Sat, 02 Dec 2006 19:09:00 -0000 From: Chet Ramey Reply-To: chet.ramey@case.edu User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: "H. J. Lu" 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 References: <20061121213205.GA13310@lucon.org> <20061128164658.GB20882@nevyn.them.org> <20061128165844.GA13667@lucon.org> <20061202184344.GA2197@lucon.org> In-Reply-To: <20061202184344.GA2197@lucon.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Whitelist: YES (by domain whitelist at mpspam5.cwru.edu) 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/msg00012.txt.bz2 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. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/