public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Bruno Larsen <blarsen@redhat.com>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Inline initialization of gdbarch members
Date: Mon, 31 Oct 2022 09:03:25 -0600	[thread overview]
Message-ID: <87mt9c9gsi.fsf@tromey.com> (raw)
In-Reply-To: <d6460c72-3926-b94b-0d42-5b419ea917d1@redhat.com> (Bruno Larsen's message of "Wed, 26 Oct 2022 11:33:04 +0200")

>>>>> "Bruno" == Bruno Larsen <blarsen@redhat.com> 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

  reply	other threads:[~2022-10-31 15:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 16:15 [PATCH 0/2] Use enum for call_dummy_location Tom Tromey
2022-10-18 16:15 ` [PATCH 1/2] Inline initialization of gdbarch members Tom Tromey
2022-10-26  9:33   ` Bruno Larsen
2022-10-31 15:03     ` Tom Tromey [this message]
2022-10-18 16:15 ` [PATCH 2/2] Use enum for gdbarch's call_dummy_location Tom Tromey
2022-10-26 11:57   ` Bruno Larsen
2022-10-26 11:25 ` [PATCH 0/2] Use enum for call_dummy_location Luis Machado

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=87mt9c9gsi.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=blarsen@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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).