From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xoLUHIJgDWdluQ0AWB0awg (envelope-from ) for ; Mon, 14 Oct 2024 14:18:42 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=cFy8HBVi; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2DD501E35A; Mon, 14 Oct 2024 14:18:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 520E91E05C for ; Mon, 14 Oct 2024 14:18:41 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7F303858C98 for ; Mon, 14 Oct 2024 18:18:40 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id E914D3858C98 for ; Mon, 14 Oct 2024 18:18:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E914D3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E914D3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728929901; cv=none; b=djAADmjngPS+z3JUvfuD69c807J39qZ1GKxKPPdQPzCpE6LOATgvqYMzhV0TL5ff17kvDyP7DomoXeExsxMYSf7pz828M946GVv4bqyQoYOq0ROLTs/fCIVccsLdivEBUwEJQQItZT++telhoke9URIbCOZqdRwpUe+CXaerTm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728929901; c=relaxed/simple; bh=zKZzGG57EoiFDaNpqI9Lm1EImEHeRHaiKlU2PCDLgqM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=BrzklqiI4xR7h737lIJ/pAcEsqaMQl77yxHeYnOVH7wSPPMXT6x9Je1OQ7jxBrA91CKcCOGwL/p4XH1bnBMU4A83IV0GRAhPFMDwOLXGri0huV+FmGdrL5ASCtuhBjXzLSh43wT98BBs1fToFnypArqF/KHOU/ev5NeCMe8aasI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728929892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HKPwoEBV0rBe/tiE/8ywCHLzsSAWk8tKbvB8/dTNJAY=; b=cFy8HBViTE4ua74rtUzZsQWB5wjCk8Tz+Zl/3vwjd0uTP3/76E1go1ggi8KdyaN6bAQTNi PFqkBmKTKd9A9PA8XRFwHEvakWrM2L6kOIYFfTTBl6s5m3s0tE85przmKlHFb3AJHZuAm4 v4EUYxsgWCLqUKcFgx5E4DlHr6I6/jE= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-7YSkIXSPM-e0KePvj0hiMA-1; Mon, 14 Oct 2024 14:18:11 -0400 X-MC-Unique: 7YSkIXSPM-e0KePvj0hiMA-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6cc10cd78e4so23007946d6.3 for ; Mon, 14 Oct 2024 11:18:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728929891; x=1729534691; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HKPwoEBV0rBe/tiE/8ywCHLzsSAWk8tKbvB8/dTNJAY=; b=CN0numnE1ZooGUQawwCD1IJ/sgt0apZXqIVWmiG4tDbi2bDoYNTAjjc5J39WWBxOPL GTi8U7LNpaBe2QntnTwji9949hgYuPQX5SIwmPj25S8zErfLyalbGmugYWvQBvwzYpdD pJe06qy1fGvMcBiGpXmwhfmfkLzTxyCG4IImG43R+T1Ub0mIsltixIT+XHQwfJLuODju boa/ynSQaytZtHS49yEi8QLRKxcDDit8tDY87x/aNnvylu355QD1FX8cfJZk1tnU99/1 Q0Fzj+1WaBQ4vz1XXUCOGIZmWh8SXF5hLt3rILXMkKaRdrBp5s9wuFEgCiTAZkHMuNRR uO4A== X-Gm-Message-State: AOJu0YwMR9r2mzK+2Ol9fS5j5+PcHx65XZz46mx6fQkOEoR5OnXMbW/P ETF9Gh8wH3u/zxh+CXu7qSRKBQx2z64WnncjR+/cgKwB5YB5aMBfURs9g9l+gqWU64wUunVJ7uH 7oQIdOqkEbIhy7fQ2zAoq5bHItTaIHc2XOB1AswpXnPgkIR1eIEewdgsdVxWPmR/rips= X-Received: by 2002:a05:6214:459a:b0:6c3:6c66:af6e with SMTP id 6a1803df08f44-6cbf0062b80mr208721166d6.47.1728929890925; Mon, 14 Oct 2024 11:18:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/ZCGJ3fUKt9jZ7di8su7rLwxkGdaejAcOEevp2XEN72/IHkLNd93FxROkR1V8XcSU6uFG9g== X-Received: by 2002:a05:6214:459a:b0:6c3:6c66:af6e with SMTP id 6a1803df08f44-6cbf0062b80mr208720876d6.47.1728929890651; Mon, 14 Oct 2024 11:18:10 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:92c5::1000? ([2804:14d:8084:92c5::1000]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6cbe85a58fbsm48508816d6.12.2024.10.14.11.18.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Oct 2024 11:18:10 -0700 (PDT) Message-ID: Date: Mon, 14 Oct 2024 15:18:08 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/5] gdb: make gdbarch store a vector of frame unwinders To: Thiago Jung Bauermann , Tom Tromey Cc: gdb-patches@sourceware.org References: <20241001184235.3710608-1-guinevere@redhat.com> <20241001184235.3710608-2-guinevere@redhat.com> <87iku7hfz5.fsf@tromey.com> <87v7xydrz5.fsf@linaro.org> From: Guinevere Larsen In-Reply-To: <87v7xydrz5.fsf@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 10/11/24 10:34 PM, Thiago Jung Bauermann wrote: > Hello, > > Tom Tromey writes: > >>>>>>> "Guinevere" == Guinevere Larsen writes: >> Guinevere> Seeing as a future patch of this series wants to refactor the >> Guinevere> frame_unwind struct to use inheritance, and we'd like to not restrict >> Guinevere> the future derived classes on what destructors are allowed. In >> Guinevere> preparation for that change, this commit adds an std::vector to gdbarch >> Guinevere> to store the unwinders in. >> >> Using a vector is fine, but I still think that this approach >> makes gdbarch mildly less opaque. That is, now code anywhere can modify >> the unwinder list in any way; whereas currently this is constrained to >> the interface provided by frame-unwind.c. > Do you think it would be better if the vector was kept in a registry, > like the current frame_unwind_table is? I.e, changing: > > static const registry::key > frame_unwind_data; > > to: > > static const registry::key> > frame_unwind_data; > > ? > I am not a big fan of the registry subsystem, so I would prefer to keep it as a simple vector. However, if you are concerned about the opaqueness change, Tromey, I can try to make it more opaque. I just personally find that registry tends to make the code too opaque for programmers as well as the program itself :-) So if you want more separation, I would personally prefer to look into only receiving a copy of the unwinder list, and gdbarch is responsible for adding and removing things. Just let me know and I can give it a shot -- Cheers, Guinevere Larsen She/Her/Hers