From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wedCBuNbtGlS7CcAWB0awg (envelope-from ) for ; Fri, 13 Mar 2026 14:48:03 -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=fI9vLpZs; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 110F01E0DD; Fri, 13 Mar 2026 14:48:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 7C02A1E089 for ; Fri, 13 Mar 2026 14:48:02 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 3E1D14B35894 for ; Fri, 13 Mar 2026 18:48:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3E1D14B35894 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=fI9vLpZs Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id D8E854BCA42B for ; Fri, 13 Mar 2026 18:47:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8E854BCA42B 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 D8E854BCA42B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773427639; cv=none; b=FcFzedDgYNMWDZKSyTAlGLnqe/ekJcUpFm+6Ohp9Kyt8F1OSl88lnKNkII8d5Te7eZOv+Q4oI6IHpzw1cUgC4XJetxM6bLXZuUvp57KQA7I30Ad0GNZUNbgW3yFSktqZGCjSDTPgklep7lXZxcMtd4TivmhQK4I27kfkn6UxwT0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773427639; c=relaxed/simple; bh=FZHFVZZJ+zO3Xpgb7IO2mgZoD/LsXy3u/fNt7G4JGTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hXZ5YOB5uPTsDFh3MBYh97N+ftgSBQyVllf4txe0CIL9B4ZBvpWltOVwMLUObEWoA5YMPD8sCQFMAQluLf461Dd3e369K9uFyZKMr4Cc+5DQ9GSIE0+GPKP4fb4zRPN1i+Lgkx006mGHgpS7FXClt9RoXW/uwBPuWFtedPBp7NY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8E854BCA42B Received: from eig-obgw-5002b.ext.cloudfilter.net ([10.0.29.226]) by cmsmtp with ESMTPS id 15aCwzxKwSkcf17XawUCBR; Fri, 13 Mar 2026 18:47:18 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 17X9wrj8BN3K117XAwQ8G5; Fri, 13 Mar 2026 18:46:52 +0000 X-Authority-Analysis: v=2.4 cv=UdRRSLSN c=1 sm=1 tr=0 ts=69b45bb4 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Yq5XynenixoA:10 a=ItBw4LHWJt0A:10 a=_ZhYKdCeAAAA:8 a=zstS-IiYAAAA:8 a=HFWy2WG8tBLf-tj8nXgA:9 a=uqOk3ZSnBfCTOznnrPA1:22 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC: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=m3QUuMeTULhj4Tl8fj3LLlvqkif9D+d8bwMRFBmb+MQ=; b=fI9vLpZsJOEesKCAFVQ0WYwmLv nvMOQEmM95lefhzYs+bhJpWctf1LgUzz8osBcAdfa0rmct6tvmub0MkMPU3VcZPFK7WrWfM4Y15yl afCqjFETZbRuJqJL1qpD/Let5; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:52440 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w17X9-000000017RE-2pzK; Fri, 13 Mar 2026 12:46:51 -0600 From: Tom Tromey To: simon.marchi@polymtl.ca Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 5/5] gdb: make find_memory_region_ftype a function_view In-Reply-To: <20260310173104.676640-5-simon.marchi@polymtl.ca> (simon marchi's message of "Tue, 10 Mar 2026 13:30:36 -0400") References: <20260310173104.676640-1-simon.marchi@polymtl.ca> <20260310173104.676640-5-simon.marchi@polymtl.ca> X-Attribution: Tom Date: Fri, 13 Mar 2026 12:46:50 -0600 Message-ID: <87a4wbr2hx.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: 75.166.225.82 X-Source-L: No X-Exim-ID: 1w17X9-000000017RE-2pzK X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (bapiya) [75.166.225.82]:52440 X-Source-Auth: tom+tromey.com X-Email-Count: 14 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKON0XQ06/34FFlNHQLz7Bpm3Wszw49DRYM6LzRjfKfzMkapH6GiMvqwU/St5FhXb447qi7Ig6J2/VdsuWRKYu9mjJtWsACIcVWPzCNxhDnl7/qKWQhC YRMnRuC2xQKZhFZ7M7oiSP1W04kouJjqR5UnfBk2PtE9h0S7/EDPGehTmUVhFaYGxcV1lmJDcx0Y7iQmAiKYBV8a2cciEWbilJo= 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 >>>>> "Simon" == simon marchi writes: Simon> From: Simon Marchi Simon> Make it a function_view and remove the `void *` parameter. Convert the Simon> callers (in gcore.c) to use lambda functions that capture `obfd`. Simon> One thing is that I am not sure how to implement Simon> target_debug_print_find_memory_region_ftype now... right now I made it Simon> return a constant "" string. I think this is fine. Some of these debug printers are already not really that useful. Simon> To make target.h see find_memory_region_ftype, I added an include of Simon> gdbarch.h in target.h, I'm not sure if this is undesirable, possibly Simon> causing some circular include problem in the future. Simon> find_memory_region_ftype was previously in defs.h. Leaving it there Simon> would require including gdbsupport/function-view.h inside defs.h, which Simon> I would prefer not to do. An alternative would be to place Simon> find_memory_region_ftype in a smaller (perhaps a new) header file, but I Simon> don't really know which one. It's tempting to try to fix it now before it is a problem. Though I somewhat suspect that what you have already is fine. I do think having a new small header just for this type would be completely fine and I think it's a reasonable long-term strategy for handling this kind of "pro forma" typedef. As in, I'd encourage this in other cases where breaking circular dependencies is needed. Anyway I also think this is ok. Approved-By: Tom Tromey Tom