From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2720 invoked by alias); 29 Mar 2006 15:49:42 -0000 Received: (qmail 2702 invoked by uid 22791); 29 Mar 2006 15:49:41 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 29 Mar 2006 15:49:40 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FOcvL-0008Lw-3G; Wed, 29 Mar 2006 10:49:31 -0500 Date: Wed, 29 Mar 2006 16:38:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: Mark Kettenis , gdb-patches@sourceware.org, insight@sourceware.org Subject: Re: [PATCH] Don't call Insight hooks when not appropriate Message-ID: <20060329154931.GA31875@nevyn.them.org> Mail-Followup-To: Andrew STUBBS , Mark Kettenis , gdb-patches@sourceware.org, insight@sourceware.org References: <44104BB2.6000108@st.com> <200603091910.k29JAucq014442@elgar.sibelius.xs4all.nl> <20060309191304.GA31165@nevyn.them.org> <44115FE2.4070206@st.com> <20060325000428.GH26748@nevyn.them.org> <4427CCAC.3030800@st.com> <20060328215858.GC10392@nevyn.them.org> <442AAA5F.1010004@st.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <442AAA5F.1010004@st.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00342.txt.bz2 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