Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] Make bcache more type-safe
Date: Wed, 27 Mar 2024 15:15:01 +0100	[thread overview]
Message-ID: <CAJVr-EMV0vso2Gk2CNEU09YO2JJf9gqjut5jE2Yz2bOAaFR5hg@mail.gmail.com> (raw)
In-Reply-To: <20240320-bcache-type-v1-2-fe616105e9ae@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

On Wed, Mar 20, 2024 at 9:24 PM Tom Tromey <tromey@adacore.com> wrote:

> The bcache uses memcpy to make copies of the data passed to it.  In
> C++, this is only safe for trivially-copyable types.
>
> This patch changes bcache to require this property, and slightly
> changes the API to make it easier to use when copying a single object.
> It also makes the new 'insert' template methods return the correct
> type.
> ---
>  gdb/bcache.h   | 25 ++++++++++++++++++++++++-
>  gdb/gdbtypes.c |  2 +-
>  gdb/macrotab.c | 12 ++++++------
>  gdb/psymtab.c  |  6 ++----
>  4 files changed, 33 insertions(+), 12 deletions(-)
>
>
> I can confirm this change does not cause any regressions on Fedora Rawhide
aarch64.

[-- Attachment #2: Type: text/html, Size: 1090 bytes --]

  reply	other threads:[~2024-03-27 14:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 20:23 [PATCH 0/3] Better type safety for bcache Tom Tromey
2024-03-20 20:23 ` [PATCH 1/3] Some constification in psymtab Tom Tromey
2024-03-25 15:00   ` Alexandra Petlanova Hajkova
2024-03-20 20:23 ` [PATCH 2/3] Make bcache more type-safe Tom Tromey
2024-03-27 14:15   ` Alexandra Petlanova Hajkova [this message]
2024-03-20 20:24 ` [PATCH 3/3] Remove a couple unnecessary casts Tom Tromey
2024-03-27 19:50   ` Alexandra Petlanova Hajkova

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=CAJVr-EMV0vso2Gk2CNEU09YO2JJf9gqjut5jE2Yz2bOAaFR5hg@mail.gmail.com \
    --to=ahajkova@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /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