From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16904 invoked by alias); 17 Mar 2008 14:17:38 -0000 Received: (qmail 16896 invoked by uid 22791); 17 Mar 2008 14:17:38 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Mar 2008 14:17:10 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 843A4983BF; Mon, 17 Mar 2008 14:17:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4DAA498011; Mon, 17 Mar 2008 14:17:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JbG9D-0005KD-KQ; Mon, 17 Mar 2008 10:17:07 -0400 Date: Mon, 17 Mar 2008 14:17:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [commit] Fix compile error (Re: [RFA] Async mode fixes.) Message-ID: <20080317141707.GA20405@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , Vladimir Prus , gdb-patches@sources.redhat.com References: <200803051027.29575.vladimir@codesourcery.com> <200803171410.m2HEAWtC008777@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803171410.m2HEAWtC008777@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes 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: 2008-03/txt/msg00227.txt.bz2 On Mon, Mar 17, 2008 at 03:10:32PM +0100, Ulrich Weigand wrote: > > + long time_at_cmd_start; > [snip] > > + if (target_can_async_p ()) > > + { > > + time_at_cmd_start = get_run_time (); > [snip] > > + if (target_can_async_p () && target_executing) > > + { > and the compiler error seems somewhat justified as the compiler cannot > know that target_can_async_p () always returns the same value ... > > Fixed by adding a dummy initializer, as already done for space_at_cmd_start. Thanks, I was just looking at this. But it made me wonder: what if target_can_async_p changes when we execute the command? For instance, a "target" command? Also, it looks like an async command which starts the target will print out the time it took twice. -- Daniel Jacobowitz CodeSourcery