From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by sourceware.org (Postfix) with ESMTPS id 9DDEC3853818 for ; Mon, 31 Oct 2022 15:03:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9DDEC3853818 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2d.google.com with SMTP id o65so9949331iof.4 for ; Mon, 31 Oct 2022 08:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=SbYTPw4u9xo1991qhe9qPH3DH0YDWGwfjFJ5A4H/6RQ=; b=EFJzZ4ZNbDY0r69OH9Qc1U9TI3jqPNsIElmwSFAr3up6+bkpzs9i5FRrsxbCgqTwEO UWP8yTFREpIqmBLKIucBW0qnJDs5KC5DG7cEAAuO06gsUojQz+yGeCoc9YFLwoL3LmMt C4qgVmVuyquQNJjC4J0kAb5jmc8OheZ+2iXfkoW+M7/XSsnuZCD3OKe1PbruUM/T02vR WHdLKDfBXsReFo7ES07MEYaxBFtLT3qxQn0cEtxDIwwn153ZIzXwlXpqZomWZhzrTR0v MZXjHWFlgZqiJYy7hJBA+ylRvc/1zXLMEzPEJVNYbVZHjGcS0zuc2tmBI6TeGJFT9dnY ufIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SbYTPw4u9xo1991qhe9qPH3DH0YDWGwfjFJ5A4H/6RQ=; b=0DxfGsMzRvWkgiPVz0a5ZQeHeFG0SbACINKcT5bhgsYmKHz+b3+2PcD6ltiIKI9KLE cOBb3H/0Wx/p3jhb0by1nBpCGthavRxuHSc+GuUqLwfOaGHJuFglFNLVi7g5hC7ehalF z7r9O3H2F+9JxUWlOnWyGA9CMYMzDom9+IpvoPocukDXMiOgX6WcYLw2db9trER78nrA LBnUgQxC6OVrQjZw66izQ+QfdFGmEB10r/1/cjVlUcwnZN43ZoeonL1nnGbGnfY6So0x CU9QEwSNDHhskTlC+ijYq5xdBELI267pPRii8XmKtfjyGTNHLfZimnv0e7SKi6siWXfj dASA== X-Gm-Message-State: ACrzQf1iUG2N5ClgDsuKgE5vZxwuoRPlhCkyyUL69h2IOkj7ethXk16L sLak7oXiLNejhD3oIBZRjjjZLg== X-Google-Smtp-Source: AMsMyM63uA6gCJXnECAxa894CWtOurKFTB9dwtXgavCbKh8davT72v0Z99d4OLd+RT8YiSDMIaDV3A== X-Received: by 2002:a02:3346:0:b0:375:4c11:ee4d with SMTP id k6-20020a023346000000b003754c11ee4dmr5465013jak.207.1667228606884; Mon, 31 Oct 2022 08:03:26 -0700 (PDT) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id h7-20020a05660208c700b006bbddd49984sm2878263ioz.9.2022.10.31.08.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 08:03:26 -0700 (PDT) From: Tom Tromey To: Bruno Larsen Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 1/2] Inline initialization of gdbarch members References: <20221018161533.3089756-1-tromey@adacore.com> <20221018161533.3089756-2-tromey@adacore.com> X-Attribution: Tom Date: Mon, 31 Oct 2022 09:03:25 -0600 In-Reply-To: (Bruno Larsen's message of "Wed, 26 Oct 2022 11:33:04 +0200") Message-ID: <87mt9c9gsi.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Bruno" == Bruno Larsen writes: Bruno> On 18/10/2022 18:15, Tom Tromey via Gdb-patches wrote: >> This changes gdbarch to use the "predefault" to initialize its members >> inline. This required changing a couple of the Value instantiations >> to avoid a use of "gdbarch" during initialization, but on the whole I >> think this is better -- it removes a hidden ordering dependency. Bruno> I don't really understand gdbarch, so sorry if this is an obvious Bruno> question, but why have you only avoided using gdbarch in Value Bruno> instantiations and kept them in Info instantiations? (lines 120 and Bruno> 141, for instance) This patch only needed to touch the 'predefault's, because after the patch these are used for inline initializers. The lines you point out here are 'printer' fields. These are used for debug output in the individual methods, so it's still fine for these to refer to the gdbarch local variable. Tom