This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PATCH: PR tui/2173: Arrow keys no longer works in breakpoint command list
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Chet Ramey <chet dot ramey at case dot edu>
- Cc: GDB <gdb-patches at sources dot redhat dot com>, jkratoch at redhat dot com, bug-readline at gnu dot org, chet at case dot edu
- Date: Sat, 2 Dec 2006 14:15:41 -0800
- 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> <4571CF2A.3040608@case.edu>
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.