From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by sourceware.org (Postfix) with ESMTPS id 5B778395BC43 for ; Tue, 3 May 2022 19:32:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B778395BC43 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f42.google.com with SMTP id l62-20020a1c2541000000b0038e4570af2fso1813710wml.5 for ; Tue, 03 May 2022 12:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=t9J12A5Cv3W22QdAg7580WQfJDXTsceMkYDaV12ulbQ=; b=oMGkM329d+iRcVIdJHe2ljvjuSbMz3kayTwYvbHXQAwuFWaOXJrNXL0tmwI3XI3b+w Zk1scf+/NeHQmHE04s7p0NE3CW0zo3KRiOv9CBTj0SpWFBCnyItzYBzpo4DZo2aDte/R uqMV7s4jSPTR6P6HAuSJSddJLGfIGRcYDxJjTdVMOkVNeIXq2TiBg3+GuK20R+a8snex 9VI2FfAgurNGlDWqObhkpORMwLOeHyp+2p3xwdJPeVFWVMefxhGkQUqtz8BsyFa5+2ND bJrmYv79LdS9p0YCconUOQYcDEnBZ4xXV83e17U9WjRu3kCJ5m8FUUmnBn2yBIYsfHvL 3MwA== X-Gm-Message-State: AOAM530l8zqgtab9xy4yLYJN3kh/zJdQojjGgcQd8Z9HRV8rRkbeIdQ2 xK1BEqu95QebHmoI3+6POWWinZ64qWU= X-Google-Smtp-Source: ABdhPJwAGlxBJeLu5Rd0sj8jKILJ2YvaRB/+rZ/jqokBytak4Rqp6P+DqE7VS1U1Ldj09zLZJNVaPw== X-Received: by 2002:a05:600c:5112:b0:394:55bd:5f9d with SMTP id o18-20020a05600c511200b0039455bd5f9dmr1299681wms.188.1651606373216; Tue, 03 May 2022 12:32:53 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id c23-20020a7bc017000000b003942a244ecesm2213890wmb.19.2022.05.03.12.32.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 May 2022 12:32:51 -0700 (PDT) Message-ID: Date: Tue, 3 May 2022 20:32:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 18/18] Introduce catchpoint class Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220502221553.1394743-1-tom@tromey.com> <20220502221553.1394743-19-tom@tromey.com> From: Pedro Alves In-Reply-To: <20220502221553.1394743-19-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2022 19:32:55 -0000 On 2022-05-02 23:15, Tom Tromey wrote: > This introduces a catchpoint class that is used as the base class for > all catchpoints. init_catchpoint is rewritten to be a constructor > instead. > > This changes the hierarchy a little -- some catchpoints now inherit > from base_breakpoint whereas previously they did not. This isn't a > problem, as long as re_set is redefined in catchpoint. This hierarchy change stretches things a bit. By inheriting base_breakpoint, this is saying that catchpoints is-a software/hardware breakpoint, while most catchpoints are not. Catchpoints are exactly the event points that are _not_ some PC location that execution traps at. Catchpoints that end up being a breakpoint under the hood, like exception_catchpoint, I'd say should be more like as-a base_breakpoint than is-a base_breakpoint, though that isn't very nicely expressible doable today, I think. Alternatively, we could have two different base classes, one for catchpoints (signal, syscalls, etc.), and another for breakpoint-like catchpoints. But I suppose in the end either change wouldn't simplify much, if anything. So despite my eyebrow raising, I'm OK with your patch.