This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't call Insight hooks when not appropriate
On Wed, Mar 29, 2006 at 04:40:15PM +0100, Andrew STUBBS wrote:
> Daniel Jacobowitz wrote:
> >>I haven't actually tested it, but shouldn't gdbtk_readline() and
> >>gdbtk_query() return values? In particular, gdbtk_query() should return
> >>1 (yes) as the default answer, just as query() does in utils.c.
> >
> >You're right; my patch won't work. How about this one instead? Make
> >input_from_terminal_p do something sensible for Insight.
>
> I'm a little confused now. I assume you meant to retain the cli-script.c
> and top.h patches from your previous posting, but, even so, your patch
> doesn't even attempt to tackle the problems with query() and
> read_command_lines().
I'm confused - did you try the same patch I posted? There was a top.h
diff in what I posted, and a cli-script.c patch.
I changed the behavior of input_from_terminal_p (yes, removal of the
caution check was deliberate - I audited all the callers), and moved it
above the calls to deprecated_query_hook. That should have fixed the
query case. Similarly read_command_lines's call to the deprecated
hooks is now guarded by input_from_terminal_p ().
It looked much like what you've posted below, except more thorough
(e.g. you missed defaulted_query). I can see the whole patch in the
list archives, so I wonder if your mail client ate it.
--
Daniel Jacobowitz
CodeSourcery