From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +7xCF9BX8mi7rDwAWB0awg (envelope-from ) for ; Fri, 17 Oct 2025 10:50:56 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=QYmQISzp; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 476591E047; Fri, 17 Oct 2025 10:50:56 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id BFB271E047 for ; Fri, 17 Oct 2025 10:50:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4DF323856DD1 for ; Fri, 17 Oct 2025 14:50:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DF323856DD1 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=QYmQISzp Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id D1EC2385B51E for ; Fri, 17 Oct 2025 14:49:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1EC2385B51E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D1EC2385B51E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760712594; cv=none; b=KKlPg3ZXaVPepFPNxfxGNG7rYtUH+4jQvhXMElJ1owY+ZG5wFvpO9dgLeNp+PxUh/fK7WdVlEnMMtDEWvyp11Ka4VaGWeFBao41MQoPQBoSlH0jVQ6iXJjEnt4UnrH1wSeWOVrLWckG7QoXybt2mVauIG2S9tRLTj8+rkXxyCms= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760712594; c=relaxed/simple; bh=EIyXR8rZ2SMGj29KQDhmHGWUdOcn6N58DwTx6bXF7Ck=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=sDO45/csnIFDHlG+14R06/ICX+5a+lT4uuMu/46701RETrXh4V7xtXtKqPwB/bmtvFqvGKJMpPOC/OEJRv4c33xIr4fDkAb8mFpwYGlbR7EBB9JtcbW8AoO3QB95XRBI6/4f/CYTLktNIQ5bn/8qxVyTlC3WSY1g+cy3GbPVe5M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1EC2385B51E Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id 9l9lvqSNyKXDJ9lmEv28Az; Fri, 17 Oct 2025 14:49:54 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 9lmDv9iRQDV659lmDvKd4w; Fri, 17 Oct 2025 14:49:54 +0000 X-Authority-Analysis: v=2.4 cv=dLammPZb c=1 sm=1 tr=0 ts=68f25792 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=x6icFKpwvdMA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=r2YcAwRCJ0zGn8rKjiYA:9 a=ZXulRonScM0A:10 a=zZCYzV9kfG8A:10 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=e4kE6L23HUj3+Hui+nU1og2MBFKpbvc0p0tnzNY4kqc=; b=QYmQISzp3KuYV8CDAx7XBa9Tfw J5FK8CGkQfyYLu4PGp/p6oOJdwcrKTRhLJT/8uRDI7dR9mCdUVx7/DN3QuQ0sHY4A1HMevSV/oGM1 dGW6ttJL6UqB4LiI99TxUsqvi; Received: from 97-122-110-68.hlrn.qwest.net ([97.122.110.68]:42626 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1v9lmD-00000002xHP-20nl; Fri, 17 Oct 2025 08:49:53 -0600 From: Tom Tromey To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] infcall: Add support for integer literals as reference function paramters In-Reply-To: <92575c2eb6805095b41ebbe62ba99b81e4e5dd63.1760629738.git.keiths@redhat.com> (Keith Seitz's message of "Thu, 16 Oct 2025 08:48:58 -0700") References: <92575c2eb6805095b41ebbe62ba99b81e4e5dd63.1760629738.git.keiths@redhat.com> X-Attribution: Tom Date: Fri, 17 Oct 2025 08:49:52 -0600 Message-ID: <87zf9ppoq7.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.68 X-Source-L: No X-Exim-ID: 1v9lmD-00000002xHP-20nl X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-68.hlrn.qwest.net (bapiya) [97.122.110.68]:42626 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfJUCP7LxXAmRulZQ0aIAIqwEZmQbXOdsa2KSTJntH11NShhscY1rsu90/oo6bvYY0/wG2uZrk6uPn/UNjUzZVzI/mu5dBXoBVwGJAq3Tvr+l8Zqo8y4s T1BZOfDMc+CYyYGNsUY3CzLO1OphaJNvvYZ/sRceJTew6mlHWZedAwmhNLAFdsbz22Jb/RavKACa6SGMZtyatNOjRp1MNi++vMY= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Keith" == Keith Seitz writes: Keith> This patch attempts to mitigate the shortcomings of passing literals Keith> to inferior function calls requiring references. The specific use case here Keith> is std::map's operator[]: Keith> (gdb) print int_map[1] Keith> Attempt to take address of value not located in memory. I didn't see in the text or the patch what the method type really is. Keith> +#include Keith> +#include It's better for tests not to use libstdc++ stuff if possible, and to just write out a method with the problem signature in a locally-defined type. Keith> -if {[build_executable $testfile.exp $testfile $srcfile {debug c++}] == -1} { Keith> +if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { This results in starting an extra gdb that is immediately exited. Tom