From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 818 invoked by alias); 3 May 2017 15:27:45 -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 798 invoked by uid 89); 3 May 2017 15:27:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=ears, Hx-languages-length:906 X-HELO: mail-wr0-f173.google.com Received: from mail-wr0-f173.google.com (HELO mail-wr0-f173.google.com) (209.85.128.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 15:27:43 +0000 Received: by mail-wr0-f173.google.com with SMTP id l9so111230496wre.1 for ; Wed, 03 May 2017 08:27:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=SzD0h/Az+ej/Tn5Bx6V5hs89xw0LlxdLVcnvasw3PnA=; b=RWj8cLloDLWSaTG3eMhAuKJlgoTo264FcLQ61Yzs1soM4eezl6R0Cq7Ig3t7GksgA5 /mWjR0MY/dph7IIZ9D3EjtgW4qtVLSRiim+2EJZGe/t4vzExVAJCOIqgg12I74cCs9ew z8qOL/SscDJVLKE0xZT3K1QvwyqwnLc8X18t1/NOiWJMBW7YmxI7GGKTKkFEAG6cZeWm 1e9Q5fguC1Wy5IJy7lobMdr0nVU4CktPT5LLcLcNqhA7HW7S2Ie8D6tfLS571TyK8K8s dUKUgrvXRyv+f77287kdHvD22Y5IXpFgTKdUyhNUozf5YtnoP5oFC/of93HSVmCbcdlZ dSWg== X-Gm-Message-State: AN3rC/7BzqqnywhkqA2S9Qi2DNzYqYj5V0ATBoYRJ2VaMwpiUiiJYtgf InnMYrYia3vofGLH X-Received: by 10.223.171.208 with SMTP id s74mr25393295wrc.39.1493825263983; Wed, 03 May 2017 08:27:43 -0700 (PDT) Received: from [192.168.0.102] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id p107sm16597500wrb.64.2017.05.03.08.27.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 May 2017 08:27:43 -0700 (PDT) Subject: Re: [PATCH] Make breakpoint subclasses inherit from breakpoint, add virtual destructor To: Simon Marchi References: <20170502191811.32333-1-simon.marchi@ericsson.com> <0f7aaf0f-6498-2b2e-7cc9-e7656fbc6079@redhat.com> <647998f3cb9e763dd7da94e9c9d675ca@polymtl.ca> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <413d78f7-5afa-2cdf-86c0-18d597d43da5@redhat.com> Date: Wed, 03 May 2017 15:27:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg00061.txt.bz2 On 05/03/2017 04:23 PM, Simon Marchi wrote: > FYI, I just looked at it, and it looks like the > momentary_breakpoint/longjmp_breakpoint hierarchy will cause a bit of > trouble. longjmp_breakpoint has a dtor, but no struct/class of its own, > so nowhere to put the destructor. I think that to do it correctly, I'll > have to introduce structs/classes for them and have: > > breakpoint > ^ > | > momentary_breakpoint > ^ > | > longjmp_breakpoint > > To keep it clean, it might be better if I introduced the structs/classes > for momentary_breakpoint and longjmp_breakpoint first with the old-style > inheritance, and then converted them to "real" inheritance along with > the other types. That sounds fine to me. > > I'll try that tonight, but if you have ideas in the mean time, I'm all > ears. Thanks, Pedro Alves