From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AH2TA9bqZ2QkDQ8AWB0awg (envelope-from ) for ; Fri, 19 May 2023 17:32:06 -0400 Received: by simark.ca (Postfix, from userid 112) id EFFD41E11E; Fri, 19 May 2023 17:32:05 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=I8SB95Mn; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9D3221E0D6 for ; Fri, 19 May 2023 17:32:05 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1A2973853568 for ; Fri, 19 May 2023 21:32:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A2973853568 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684531925; bh=9IwiLMV6IFGaUw7bGhfzOMYLUvKm3SQmtcRmen+6utk=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=I8SB95Mny99j5qH8B07djz1AQlwByfaMQDXjjDVYSazm1j5Jc+EQ+sfSakxgCKBCT QebasElLNUXi1pIoWhLoqnLE+9InAyucNCPBkacZVS/7OVr8r7FY8vuTEY/0+fcHpx H75NuQlcoWytLMhfddlc65U1KeLXKcRenOb+lxQI= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AF03F3856962 for ; Fri, 19 May 2023 21:31:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AF03F3856962 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-e1AnVQHkM7SLXMwlj9Jnmg-1; Fri, 19 May 2023 17:31:44 -0400 X-MC-Unique: e1AnVQHkM7SLXMwlj9Jnmg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3750E80013A; Fri, 19 May 2023 21:31:44 +0000 (UTC) Received: from f38-zws-nv (unknown [10.22.32.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4E1040CFD46; Fri, 19 May 2023 21:31:43 +0000 (UTC) Date: Fri, 19 May 2023 14:31:42 -0700 To: Simon Marchi via Gdb-patches Cc: Simon Marchi Subject: Re: [PATCH] gdbsupport: add support for references to checked_static_cast Message-ID: <20230519143142.126781d9@f38-zws-nv> In-Reply-To: <20230518205737.403656-1-simon.marchi@efficios.com> References: <20230518205737.403656-1-simon.marchi@efficios.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, 18 May 2023 16:57:37 -0400 Simon Marchi via Gdb-patches wrote: > 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. I'm not especially knowledgeable in this area, but it LGTM. Acked-by: Kevin Buettner