From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61555 invoked by alias); 19 Jun 2017 21:30:43 -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 61435 invoked by uid 89); 19 Jun 2017 21:30:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=opportunity, our 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; Mon, 19 Jun 2017 21:30:25 +0000 Received: by simark.ca (Postfix, from userid 33) id 75FF21E560; Mon, 19 Jun 2017 17:30:28 -0400 (EDT) To: Yao Qi Subject: Re: [PATCH 03/25] Class-fy tdesc_reg tdesc_type and tdesc_feature 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: Mon, 19 Jun 2017 21:30:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: <1497256916-4958-4-git-send-email-yao.qi@linaro.org> References: <1497256916-4958-1-git-send-email-yao.qi@linaro.org> <1497256916-4958-4-git-send-email-yao.qi@linaro.org> Message-ID: <9f54f8e4d6eec605f0620ceeae7d6842@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.5 X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00550.txt.bz2 On 2017-06-12 10:41, Yao Qi wrote: > --- a/gdb/target-descriptions.c > +++ b/gdb/target-descriptions.c > @@ -48,6 +48,32 @@ DEF_VEC_O(property_s); > > typedef struct tdesc_reg > { > +public: > + tdesc_reg (struct tdesc_feature *feature, const char *name_, > + int regnum, int save_restore_, const char *group_, > + int bitsize_, const char *type_) > + : name (xstrdup (name_)), target_regnum (regnum), > + save_restore (save_restore_), > + group (group_ ? xstrdup (group_) : NULL), > + bitsize (bitsize_), > + type (type_ ? xstrdup (type_) : xstrdup ("")) Oh, I forgot to mention: you could take this opportunity to make these expression respect our coding style (use != NULL to check for NULL pointer). Simon