From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130984 invoked by alias); 13 Apr 2017 10:24:41 -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 130966 invoked by uid 89); 13 Apr 2017 10:24:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f50.google.com Received: from mail-wm0-f50.google.com (HELO mail-wm0-f50.google.com) (74.125.82.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Apr 2017 10:24:39 +0000 Received: by mail-wm0-f50.google.com with SMTP id o81so107670107wmb.1 for ; Thu, 13 Apr 2017 03:24:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=9+aISmr7LFqUF6OXS1y7Gdy8zLLzRT2+VxS1PLeFPGc=; b=i21/spobBuvFB4ER2FvtKpW3rj4Jlrxqt9++bm4NHv3gWQmDQ7OFKVudnt7jhyG2DH F3kztqzk3FQ2+3qZfVXNYSuBAGRsTWq3o7NSQn9z7Q8XBW4DQQ8jGIXzFcdaGs/WbSk6 bv0AN/1L+Pqz/aQF5ew1waDZww1Hiicg+oy4mPMgc/WImHOpGkdZ9ISHRxq8Dp7DSqJd mY6pLgAuQyUi9P5zJuZRX4+nhHawE+wnxz0C3Mxvk8yti1mJb2foYJIe4aF8KqNcrx7A L5qAGYjrD5QbBVmh8E9DrhshDsCZ3JdL+6k+5ZDBqsX0llVsaF9fLJxRarIHOaJ5booN sbag== X-Gm-Message-State: AN3rC/6u2x3i+IbrbZANuFWhd81CLOAvkNciQIzbQe91Shi7JEi5pYWB FakxjhzAhZN46Q== X-Received: by 10.28.20.202 with SMTP id 193mr24593240wmu.43.1492079078681; Thu, 13 Apr 2017 03:24:38 -0700 (PDT) Received: from E107787-LIN ([194.214.185.158]) by smtp.gmail.com with ESMTPSA id g15sm9105185wmc.14.2017.04.13.03.24.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 13 Apr 2017 03:24:38 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 6/8] Make inferior a class with cdtors, and use new/delete References: <1491954673-29172-1-git-send-email-palves@redhat.com> <1491954673-29172-7-git-send-email-palves@redhat.com> Date: Thu, 13 Apr 2017 10:24:00 -0000 In-Reply-To: <1491954673-29172-7-git-send-email-palves@redhat.com> (Pedro Alves's message of "Wed, 12 Apr 2017 00:51:11 +0100") Message-ID: <86shlc8v1b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00413.txt.bz2 Pedro Alves writes: > gdb/ChangeLog: > yyyy-mm-dd Pedro Alves > > * inferior.c (free_inferior): Convert to ... > (inferior::~inferior): ... this dtor. > (inferior::inferior): New ctor, factored out from ... > (add_inferior_silent): ... here. Allocate the inferior with a new > expression. > (delete_inferior): Call delete instead of free_inferior. > * inferior.h (gdb_environ, continuation): Forward declare. > (inferior): Now a class. Add in-class initialization to all > members. Make boolean fields bool, except 'detaching'. > (inferior::inferior): New explicit ctor. > (inferior::~inferior): New. LGTM. --=20 Yao (=E9=BD=90=E5=B0=A7)