From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73685 invoked by alias); 22 Nov 2017 20:04:27 -0000 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 Received: (qmail 73671 invoked by uid 89); 22 Nov 2017 20:04:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Nov 2017 20:04:26 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id vAMK4JGK006681 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Nov 2017 15:04:24 -0500 Received: by simark.ca (Postfix, from userid 112) id 504661E585; Wed, 22 Nov 2017 15:04:19 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id E27F31E030; Wed, 22 Nov 2017 15:04:18 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 22 Nov 2017 20:04:00 -0000 From: Simon Marchi To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] Basic c++ification of varobj In-Reply-To: <20171121213049.4h5tuq64wakvk6jv@localhost> References: <20171118214606.24468-1-simon.marchi@polymtl.ca> <20171118214606.24468-2-simon.marchi@polymtl.ca> <20171121213049.4h5tuq64wakvk6jv@localhost> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.2 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 22 Nov 2017 20:04:19 +0000 X-IsSubscribed: yes X-SW-Source: 2017-11/txt/msg00511.txt.bz2 On 2017-11-21 16:30, Yao Qi wrote: > On 17-11-18 16:46:03, Simon Marchi wrote: >> >> /* If 1, the -var-update always recomputes the value in the >> current thread and frame. Otherwise, variable object is >> always updated in the specific scope/thread/frame. */ >> - int floating; >> + int floating = 0; >> >> /* Flag that indicates validity: set to 0 when this varobj_root >> refers >> to symbols that do not exist anymore. */ >> - int is_valid; >> + int is_valid = 1; > > Since we do the change, can we change these fields to bool? To keep patches simple, I'll do that in another patch on top of that series. There are more places we can change variables to bool, so I'll make a pass on the whole varobj.c/h. >> @@ -114,27 +113,27 @@ struct varobj_dynamic >> used to decide if dynamic varobj should recompute their >> children. >> In the event that the frontend never asked for the children, we >> can avoid that. */ >> - int children_requested; >> + int children_requested = 0; >> > > Likewise. Otherwise, it is good to me. Thanks! Simon