From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH 2/2] gdb: make inherit_abstract_dies use vector iterators
Date: Fri, 21 Oct 2022 12:04:59 -0600 [thread overview]
Message-ID: <87fsfhaw8k.fsf@tromey.com> (raw)
Message-ID: <20221021180459.EtiWGvd7sNbmkENj9cX99leDH6SWFRnP43PAzJYVyzA@z> (raw)
In-Reply-To: <20221021132104.1772565-2-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Fri, 21 Oct 2022 09:21:04 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> Small cleanup to use std::vector iterators rather than raw pointers.
Looks good.
I think my previous note about hoisting the loop might be wrong after
all.
Simon> - if (offsetp >= offsets_end
Simon> - || *offsetp > origin_child_die->sect_off)
Simon> + if (offsets_it == offsets.end ()
... like I guess this could trigger.
This code is extremely hard to read IMO.
Tom
next prev parent reply other threads:[~2022-10-21 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 13:21 [PATCH 1/2] gdb: check for empty offsets vector in inherit_abstract_dies Simon Marchi
2022-10-21 13:21 ` [PATCH 2/2] gdb: make inherit_abstract_dies use vector iterators Simon Marchi
2022-10-21 18:04 ` Tom Tromey [this message]
2022-10-21 18:04 ` Tom Tromey
2022-10-21 18:26 ` Simon Marchi
2022-10-21 15:35 ` [PATCH 1/2] gdb: check for empty offsets vector in inherit_abstract_dies Tom Tromey
2022-10-21 15:35 ` Tom Tromey
2022-10-21 15:46 ` Simon Marchi
2022-10-21 18:02 ` 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=87fsfhaw8k.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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).