public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Clean up attribute reprocessing
Date: Wed, 01 Mar 2023 19:15:42 -0700	[thread overview]
Message-ID: <87o7pblwz5.fsf@tromey.com> (raw)
In-Reply-To: <20230212231239.535298-1-tom@tromey.com> (Tom Tromey's message of "Sun, 12 Feb 2023 16:12:39 -0700")

>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:

Tom> This patch introduces a new read_toplevel_die function and changes a
Tom> few spots to call it.  This is easily done because reading the
Tom> toplevel DIE is already special.

Tom> I left the reprocessing flag and associated checks in attribute.  It
Tom> could be stripped out, but I am not sure it would provide much value
Tom> (maybe some iota of performance).

I found one small bug in this patch:

Tom> +  /* Push an element into ATTRIBUTES.  */
Tom> +  auto push_back = [&] (struct attribute *attr)
Tom> +    {
Tom> +      gdb_assert (next_attr_idx <= ARRAY_SIZE (attributes));

This assert is off-by-one so it didn't really check what it was supposed
to check.

Tom

  reply	other threads:[~2023-03-02  2:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 23:12 Tom Tromey
2023-03-02  2:15 ` Tom Tromey [this message]
2023-03-07 21:32 ` 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=87o7pblwz5.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).