From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18587 invoked by alias); 9 Mar 2006 20:20:44 -0000 Received: (qmail 18573 invoked by uid 22791); 9 Mar 2006 20:20:43 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Mar 2006 20:20:41 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k29KKcNh024146; Thu, 9 Mar 2006 15:20:38 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k29KKb128142; Thu, 9 Mar 2006 15:20:37 -0500 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id k29KKZmG014317; Thu, 9 Mar 2006 15:20:35 -0500 Message-ID: <44108E12.2010506@redhat.com> Date: Fri, 10 Mar 2006 00:19:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) MIME-Version: 1.0 To: Daniel Jacobowitz CC: Mark Kettenis , andrew.stubbs@st.com, gdb-patches@sourceware.org, insight@sourceware.org Subject: Re: [PATCH] Don't call Insight hooks when not appropriate References: <44104BB2.6000108@st.com> <200603091910.k29JAucq014442@elgar.sibelius.xs4all.nl> <20060309191304.GA31165@nevyn.them.org> In-Reply-To: <20060309191304.GA31165@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00148.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Mar 09, 2006 at 08:10:56PM +0100, Mark Kettenis wrote: > >>>Date: Thu, 09 Mar 2006 15:37:22 +0000 >>>From: Andrew STUBBS >>> >>>2006-03-09 Andrew Stubbs >>> >>> * cli/cli-script.c (execute_user_command): Set instream to -1, not 0. >>> (read_command_lines): Check instream before calling the prompt hook. >> >>I think this usage of -1 is a bad idea. > > > Me too. We're already using a global variable; why not just add > another and restore it in the same cleanup? > It might not be so bad, if replaced with a constant... #define INVALID_USER 0 #define INVALID_INSIGHT -1