Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v3 2/2] gdb, dwarf: create symbols for template tags without names
Date: Tue, 23 Aug 2022 13:06:06 -0600	[thread overview]
Message-ID: <878rnedbkx.fsf@tromey.com> (raw)
In-Reply-To: <20220823153656.1235982-3-nils-christian.kempke@intel.com> (Nils-Christian Kempke via Gdb-patches's message of "Tue, 23 Aug 2022 17:36:56 +0200")

>>>>> Nils-Christian Kempke via Gdb-patches <gdb-patches@sourceware.org> writes:

> +  die_info* child = die->parent->child;

The "*" is in the wrong spot.

> +  while (child != die && child != nullptr)

Here the loop condition checks for nullptr, but below the assert does
not:

> +  }
> +  gdb_assert (child == die);

It seems to me that one or the other must be incorrect.

> +  const std::string name_str = "<unnamed" + std::to_string (nth_unnamed) + ">";
> +  return obstack_strndup (&cu->per_objfile->objfile->per_bfd->storage_obstack,
> +			  name_str.c_str (), name_str.size ());

Better IMO to use objfile::intern.

thanks,
Tom

  reply	other threads:[~2022-08-23 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23 15:36 [PATCH v3 0/2] Handle unnamed template tags in GDB Nils-Christian Kempke via Gdb-patches
2022-08-23 15:36 ` [PATCH v3 1/2] gdb, testsuite: adapt function_range expected name Nils-Christian Kempke via Gdb-patches
2022-08-23 15:36 ` [PATCH v3 2/2] gdb, dwarf: create symbols for template tags without names Nils-Christian Kempke via Gdb-patches
2022-08-23 19:06   ` Tom Tromey [this message]
2022-08-24  8:47     ` Kempke, Nils-Christian via Gdb-patches

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=878rnedbkx.fsf@tromey.com \
    --to=tom@tromey.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