Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Fix infinite recursion in dwarf2_cu::get_builder(), again
Date: Mon, 14 Jun 2021 14:22:44 -0600	[thread overview]
Message-ID: <87tum0xkkr.fsf@tromey.com> (raw)
In-Reply-To: <20210609162305.GA7082@delia.home> (Tom de Vries's message of "Wed, 9 Jun 2021 18:23:06 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> ISTM that the ancestor implementation is confusing and fragile, and should
Tom> go.  Furthermore, it seems that keeping track of the m_builder in scope can be
Tom> handled simply with a global variable.

I'd rather not have any global variables.

Maybe a new member of dwarf2_per_objfile would be equivalent.

Tom> +  gdb_assert (dwarf2_cu::sym_cu == nullptr);
Tom> +  scoped_restore restore_sym_cu = make_scoped_restore (&dwarf2_cu::sym_cu);
Tom> +  dwarf2_cu::sym_cu = cu;

You can pass 'cu' as a second argument to make_scoped_restore.

thanks,
Tom

  reply	other threads:[~2021-06-14 20:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 16:23 Tom de Vries
2021-06-14 20:22 ` Tom Tromey [this message]
2021-06-15 15:51   ` Tom de Vries
2021-07-02 18:40     ` Tom Tromey

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=87tum0xkkr.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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