Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Andrew Burgess <aburgess@redhat.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdbsupport: add support for references to checked_static_cast
Date: Wed, 24 May 2023 10:51:47 -0400	[thread overview]
Message-ID: <d509b5b1-ad93-82c2-77de-3bee29fe5059@efficios.com> (raw)
In-Reply-To: <878rdd7u9p.fsf@redhat.com>

On 5/24/23 09:07, Andrew Burgess wrote:
> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
>> Add a checked_static_cast overload that works with references.  A bad
>> dynamic cast with references throws std::bad_cast, it would be possible
>> to implement the new overload based on that, but it seemed simpler to
>> just piggy back off the existing function.
>>
>> I found some potential uses of this new overload in amd-dbgapi-target.c,
>> update them to illustrate the use of the new overload.  To build
>> amd-dbgapi-target.c, on needs the amd-dbgapi library, which I don't
>> expect many people to have.  But I have it, and it builds fine here.  I
>> did test the new overload by making a purposely bad cast and it did
>> catch it.
> 
> Looks great.  Thanks for expanding this feature.
> 
> Reviewed-By: Andrew Burgess <aburgess@redhat.com>

Thanks.  Are you also fine with the switch to use
gdb::Requires<std::is_reference<T> to do the "target is reference"
check, as Lancelot suggested?

Simon

  reply	other threads:[~2023-05-24 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 20:57 Simon Marchi via Gdb-patches
2023-05-19 21:31 ` Kevin Buettner via Gdb-patches
2023-05-23 12:03   ` Simon Marchi via Gdb-patches
2023-05-24 13:07 ` Andrew Burgess via Gdb-patches
2023-05-24 14:51   ` Simon Marchi via Gdb-patches [this message]
2023-05-24 18:04     ` Andrew Burgess via Gdb-patches
2023-05-24 18:54       ` Simon Marchi via Gdb-patches
2023-05-24 13:22 ` Lancelot SIX via Gdb-patches
2023-05-24 14:51   ` Simon Marchi via Gdb-patches
2023-05-24 15:33     ` Lancelot SIX via Gdb-patches
2023-05-24 15:44       ` Simon Marchi via Gdb-patches

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=d509b5b1-ad93-82c2-77de-3bee29fe5059@efficios.com \
    --to=gdb-patches@sourceware.org \
    --cc=aburgess@redhat.com \
    --cc=simon.marchi@efficios.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