From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2F6UAu707GqnBCMAWB0awg (envelope-from ) for ; Thu, 05 Nov 2026 16:28:14 -0500 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=UxzI9hcy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E74E2378002; Thu, 05 Nov 2026 16:28:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 D6B1C1E043 for ; Thu, 05 Nov 2026 16:28:12 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 491BC4BA2E3D for ; Thu, 5 Nov 2026 21:28:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 491BC4BA2E3D 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=UxzI9hcy Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 356B54BA5434 for ; Thu, 5 Nov 2026 21:27:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 356B54BA5434 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 356B54BA5434 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793914066; cv=none; b=wutjpaaSlO4Nk+L5XevBuSl3vn6GhmT1JPWmB0RCTgiyYM9ymLXms64YoZULC1YupvMn8kFjASskRgWvdJYS24whldhEizAiTn+bSMhqB/6o+0K4LKGnRsrZVJQmw8UjGDpB5ULkuB6fuPHhOEXlp5jdRSkPiQgOFYzUxahIw/c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793914066; c=relaxed/simple; bh=OlvyAHoq2zMnkfdNQA+HWJoqto5qt2G0sKWtRhwm51Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JDvBECO9zlul0yOwsxC6OXgdeO+jNfghPbkImZhBVt2sBEd0Ftmeut88XyJUN0qUmJBzFD/Abb0jII/5sdBXNnlZajtWMY3bpfHWn6IljSkNgNPzTiO7eEGl5yoye/KPiwFex/4mrNlX00oKU+Wdy+5mg3Zm1SKAf9bo6oTJbZ0= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=UxzI9hcy reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 356B54BA5434 Received: from eig-obgw-6004b.ext.cloudfilter.net ([10.0.30.210]) by cmsmtp with ESMTPS id P3v2xIr8gJFmFP4zpxf6k4; Thu, 05 Nov 2026 21:27:45 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id P4zoxPUKCKD1BP4zoxFz18; Thu, 05 Nov 2026 21:27:44 +0000 X-Authority-Analysis: v=2.4 cv=N6MpF39B c=1 sm=1 tr=0 ts=6aecf4d0 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=zJRp6_cAMcgA:10 a=ItBw4LHWJt0A:10 a=7CQSdrXTAAAA:8 a=VvYe7vjIE7HHrU5ifYQA:9 a=a-qgeE7W1pNrGK8U0ZQC: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wI76wJsQy37FNDnRD86JskvOO9VciQOzMg8Ui+FR9QE=; b=UxzI9hcyHzC9YyBa5oQggz0PpA 7UgMQdB/XzVDWn8iAVviFzJORu5ivAvb1R3TcRTeqFHpUao3ntp7R33wRtvnhA+2fN2oVWC9JdOSw Wv8KvGcGLubpJ9ZSGh4/fkP00; Received: from 97-122-110-129.hlrn.qwest.net ([97.122.110.129]:55298 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xP4zo-00000000bkp-0HTO; Thu, 05 Nov 2026 14:27:44 -0700 From: Tom Tromey To: Matthieu Longo Cc: , Andrew Burgess , Tom Tromey , Thiago Jung Bauermann Subject: Re: [PATCH v3 7/8] gdb/linux-tdep: use target_file_reader for procfs parsing In-Reply-To: <20260922135050.236941-8-matthieu.longo@arm.com> (Matthieu Longo's message of "Tue, 22 Sep 2026 14:50:49 +0100") References: <20260922135050.236941-1-matthieu.longo@arm.com> <20260922135050.236941-8-matthieu.longo@arm.com> X-Attribution: Tom Date: Thu, 05 Nov 2026 14:27:42 -0700 Message-ID: <87o6c3vui9.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.129 X-Source-L: No X-Exim-ID: 1xP4zo-00000000bkp-0HTO X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-129.hlrn.qwest.net (bapiya) [97.122.110.129]:55298 X-Source-Auth: tom+tromey.com X-Email-Count: 10 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKLoYIiw4SfZHYOLXb8+sv/EDc0vqnK27uKITOETOM9e2C6Q4jYiU2SEhZtT1VeAWvyWNdw6KZs4YmAR0eGufbEABZzw9WRAwmh2fCqNp2IvPGPxaNT4 UAmbhrKmZcOHs9F2YCp4X4f+xCumbhsAa0hnmJOhmqYcaBcHKmhy+QQ+9hz4sag+A1fCUKcUnipt747jAiTovUDEXvCCG7IJo5g= 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 >>>>> Matthieu Longo writes: > Migrate procfs reads in linux_info_proc and linux_find_memory_regions_full > from the target_fileio_* allocation helpers to target_file_reader. > Use the array views provided by target_file_reader to simplify the parsing > of procfs contents. In particular, use gdb::ranges::replace for the > NUL-separated command line and extract_view_from_buffer for environment > entries. Thank you. > + std::string path = string_printf ("/proc/%ld/cmdline", ptid.lwp ()); > + target_file_reader cmdline_freader (path); [...] > + warning (_("malformed '%ps', missing null-terminating character"), > + styled_string (file_name_style.style (), path.c_str ())); This should probably use the path from cmdline_freader. This would work better with the earlier "move" suggestion for the file name. Tom