public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle
Date: Thu, 24 Aug 2023 12:37:11 +0100	[thread overview]
Message-ID: <afcbaac4-4444-a30e-3c45-4900b1132225@palves.net> (raw)
In-Reply-To: <7ec600eb-c472-d85e-f186-1c4dddbd8cdf@suse.de>

On 24/08/23 07:21, Tom de Vries wrote:

>>> +
>>> +static void
>>> +target_debug_print_gdb_array_view_const_gdb_byte (gdb::array_view<const gdb_byte> &vector)
>>
>> array_views should be passed by value normally (because they're small).  Did you run into something
>> that forced this to be a reference?  Or was it just copied from the vector case?  If it
>> works, we should just drop the &.
>>
> 
> Done.
> 
>> Also, one of the points of array_view is that you can pass a vector as array_view
>> argument, like you can pass std::string as string_view argument -- would it work to make
>> target_debug_print_const_gdb_byte_vector_r call this new
>> target_debug_print_gdb_array_view_const_gdb_byte instead of duplicating that code?
>>
> 
> Done, updated version attached.

Thanks.

Approved-By: Pedro Alves <pedro@palves.net>

  reply	other threads:[~2023-08-24 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 10:53 [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Tom de Vries
2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
2023-08-22 14:43   ` Pedro Alves
2023-08-22 17:34     ` Tom de Vries
2023-08-23 15:43       ` Pedro Alves
2023-08-24  6:21         ` Tom de Vries
2023-08-24 11:37           ` Pedro Alves [this message]
2023-08-23 15:43 ` [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py Pedro Alves

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=afcbaac4-4444-a30e-3c45-4900b1132225@palves.net \
    --to=pedro@palves.net \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).