public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 1/5] Use gdb::array_view for value_array
Date: Tue, 29 Aug 2023 09:13:37 -0600	[thread overview]
Message-ID: <87wmxdswym.fsf@tromey.com> (raw)
In-Reply-To: <f081dfbd-41b0-4c78-8710-6f8420c25bf1@polymtl.ca> (Simon Marchi's message of "Mon, 28 Aug 2023 17:10:50 -0400")

>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> struct value *
>> -value_array (int lowbound, int highbound, struct value **elemvec)
>> +value_array (int lowbound, int highbound,
>> +	     gdb::array_view<struct value *> elemvec)
>> {

Simon> I suppose it is necessary that "highbound - lowbound + 1" be equal to
Simon> elemvec.size()?

Simon> If so, we could add an assert to make sure it's true, or better (IMO),
Simon> remove highbound.

I've added a patch to do this.

Tom

  reply	other threads:[~2023-08-29 15:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28 19:59 [PATCH 0/5] Small cleanups in array_operation::evaluate Tom Tromey
2023-08-28 19:59 ` [PATCH 1/5] Use gdb::array_view for value_array Tom Tromey
2023-08-28 21:10   ` Simon Marchi
2023-08-29 15:13     ` Tom Tromey [this message]
2023-08-28 19:59 ` [PATCH 2/5] Declare 'tem' in loop header in array_operation::evaluate Tom Tromey
2023-08-28 19:59 ` [PATCH 3/5] Hoist array bounds check " Tom Tromey
2023-08-28 19:59 ` [PATCH 4/5] Remove redundant variable from array_operation::evaluate Tom Tromey
2023-08-28 19:59 ` [PATCH 5/5] Remove another " Tom Tromey
2023-08-28 21:12 ` [PATCH 0/5] Small cleanups in array_operation::evaluate John Baldwin
2023-08-29 15:35   ` 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=87wmxdswym.fsf@tromey.com \
    --to=tromey@adacore.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).