From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Павел Крюков" <kryukov@frtk.ru>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Make dtor of mapped_index_base virtual
Date: Sun, 31 Dec 2017 01:28:00 -0000 [thread overview]
Message-ID: <c2b9edd5c7188446cbfb1faacacd206f@polymtl.ca> (raw)
In-Reply-To: <CADip9gZB9YwRjDWXBbVL70izubGEowqoP0f_DaLhdXaEPqp--Q@mail.gmail.com>
On 2017-12-30 13:21, Ðавел ÐÑÑков wrote:
> gdb/Changelog:
> 2017-12-30 Pavel I. Kryukov <kryukov@frtk.ru>
>
> * 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 <kryukov@frtk.ru>
> +
> + * dwarf2read.c (mapped_index_base): Make dtor virtual
> +
> 2017-12-28 Simon Marchi <simon.marchi@polymtl.ca>
>
> * target.h (enum target_object) <TARGET_OBJECT_HPUX_UREGS,
> 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
next prev parent reply other threads:[~2017-12-31 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 18:21 Павел Крюков
2017-12-31 1:28 ` Simon Marchi [this message]
2017-12-31 10:12 ` Павел Крюков
2017-12-31 13:49 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2b9edd5c7188446cbfb1faacacd206f@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=kryukov@frtk.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).