From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51569 invoked by alias); 31 Dec 2017 01:28:50 -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 51543 invoked by uid 89); 31 Dec 2017 01:28:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-21.4 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=D*ru, hurt, HContent-Transfer-Encoding:8bit 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; Sun, 31 Dec 2017 01:28:45 +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 vBV1SdZE025180 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 30 Dec 2017 20:28:44 -0500 Received: by simark.ca (Postfix, from userid 112) id 6137B1E5A6; Sat, 30 Dec 2017 20:28:39 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 4FB501E519; Sat, 30 Dec 2017 20:28:28 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sun, 31 Dec 2017 01:28:00 -0000 From: Simon Marchi To: =?UTF-8?Q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB_=D0=9A=D1=80=D1=8E=D0=BA?= =?UTF-8?Q?=D0=BE=D0=B2?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Make dtor of mapped_index_base virtual In-Reply-To: References: 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 Sun, 31 Dec 2017 01:28:39 +0000 X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00527.txt.bz2 On 2017-12-30 13:21, Павел Крюков wrote: > gdb/Changelog: > 2017-12-30 Pavel I. Kryukov > > * dwarf2read.c (mapped_index_base): Make dtor virtual > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 8555b55..fc4c1b3 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,7 @@ > +2017-12-30 Pavel I. Kryukov > + > + * dwarf2read.c (mapped_index_base): Make dtor virtual > + > 2017-12-28 Simon Marchi > > * target.h (enum target_object) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index 484cbce..3ac4380 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -272,7 +272,7 @@ struct mapped_index_base > > /* Prevent deleting/destroying via a base class pointer. */ > protected: > - ~mapped_index_base() = default; > + virtual ~mapped_index_base() = default; > }; > > /* A description of the mapped index. The file format is described in > -- > 2.7.4 Hi Pavel, Can you clarify what you are trying to fix/improve with this patch? Since the goal is that we don't delete through a pointer of this class, does the destructor need to be virtual (not that it would hurt anything)? Do you get a build error or something? Simon