From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48796 invoked by alias); 10 May 2017 14:16:54 -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 48775 invoked by uid 89); 10 May 2017 14:16:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 May 2017 14:16:51 +0000 Received: by simark.ca (Postfix, from userid 33) id F20991E561; Wed, 10 May 2017 10:16:52 -0400 (EDT) To: "Wiederhake, Tim" Subject: Re: [PATCH v3 12/12] btrace: Store function segments as objects. X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 May 2017 14:16:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org, "Metzger, Markus T" In-Reply-To: <9676A094AF46E14E8265E7A3F4CCE9AF3C14CFF2@irsmsx105.ger.corp.intel.com> References: <1494312929-22749-1-git-send-email-tim.wiederhake@intel.com> <1494312929-22749-13-git-send-email-tim.wiederhake@intel.com> <03bcd302ae8b132f5d2209c3e40cf494@polymtl.ca> <9676A094AF46E14E8265E7A3F4CCE9AF3C14CFF2@irsmsx105.ger.corp.intel.com> Message-ID: <6a8f64acd68ace619b29497e43621d80@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00278.txt.bz2 On 2017-05-10 07:46, Wiederhake, Tim wrote: >> > + struct btrace_function bfun {mfun, fun, 0, 0, 0, NULL, 0, 0, 0, 0, >> > 0}; >> >> I think it would be much better to add a simple constructor to >> btrace_function. For the fields that should simply be zero'ed, you >> can >> initialize fields directly, like we do in many other places (e.g. >> class >> inferior). > > Having a proper constructor would definitely be beneficial here. > Nevertheless, I would do such a change in a separate patch set. Ok, but in this case I'd still prefer if you initialized the fields directly in the class right away. In the (unlikely) event that we add a field in btrace_function, we'll have to think to update this. Thanks, Simon