From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cEo8F7nIImZtPzUAWB0awg (envelope-from ) for ; Fri, 19 Apr 2024 15:40:41 -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=QfjejYUb; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4BB6E1E0C0; Fri, 19 Apr 2024 15:40:41 -0400 (EDT) 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 2DE931E030 for ; Fri, 19 Apr 2024 15:40:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF1D0384772F for ; Fri, 19 Apr 2024 19:40:38 +0000 (GMT) Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id 24B8D3849ACF for ; Fri, 19 Apr 2024 19:40:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 24B8D3849ACF 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 24B8D3849ACF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713555619; cv=none; b=J7OHXPtu2iEYl+wqzHXXYj1izrWATc5OWPuqaWSMxXylxqXTKBbd5nGL4Kh+bVWmWwf4XT9f+G1BIYg54zsZ7yk50yzn/17TtaEtWffEMS5kaMssOLmwxhWGche8PLvmPyhJ9UIQWkOdS1WgOr//9UeEiTyB7Lwemo/CYpx0mYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713555619; c=relaxed/simple; bh=3VhKXzjx0vnqxuo16FBBCbmuLgcR2iwUQNlAVmeSBaI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hN929Wm8fvIwE0+S2Ug52sIi0q0EDZZRcEtle1Pd0zQoN6C/PQUXaIBTTsfs0fPxPd6ETOqzRK3sjzrsgsaFeYaHrJ6AWOzP3G5B5nf28QfC95ObB+OW3D+H2IBzWaEbL/EQ5OfC5xLFhXNpMSK9AEggrjse9XPNCuFHDIJj6d4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5010a.ext.cloudfilter.net ([10.0.29.199]) by cmsmtp with ESMTPS id xhqkrpUOgPM1hxu5nrmvui; Fri, 19 Apr 2024 19:40:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xu5mrSlwMo82kxu5mrfegy; Fri, 19 Apr 2024 19:40:14 +0000 X-Authority-Analysis: v=2.4 cv=WOB5XGsR c=1 sm=1 tr=0 ts=6622c89e a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=raytVjVEu-sA:10 a=Qbun_eYptAEA:10 a=1Z1cYrjpJlxg-RlooPQA:9 a=ZXulRonScM0A:10 a=zZCYzV9kfG8A:10 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:In-Reply-To:Date:References :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=3VhKXzjx0vnqxuo16FBBCbmuLgcR2iwUQNlAVmeSBaI=; b=QfjejYUbrmL18LQUlq8SzIRedX D/rQohXBaWP+8BdC0uCQAnFvseLq/VuolPpfLiXm1fPfBo3BsLh8QOpn7N8mMWxSwvT4ibhWxYWco Ja6KRYNA4rdW2O/D/FmTo2mcC; Received: from 97-122-86-252.hlrn.qwest.net ([97.122.86.252]:38056 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1rxu5l-003rhT-2f; Fri, 19 Apr 2024 13:40:13 -0600 From: Tom Tromey To: Will Hawkins Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] Make source.c:search_command_helper use source cache References: <20240324011828.145140-1-hawkinsw@obs.cr> <20240325140103.157217-1-hawkinsw@obs.cr> X-Attribution: Tom Date: Fri, 19 Apr 2024 13:40:13 -0600 In-Reply-To: <20240325140103.157217-1-hawkinsw@obs.cr> (Will Hawkins's message of "Mon, 25 Mar 2024 10:00:52 -0400") Message-ID: <8734rhuoo2.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) 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.86.252 X-Source-L: No X-Exim-ID: 1rxu5l-003rhT-2f X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-86-252.hlrn.qwest.net (murgatroyd) [97.122.86.252]:38056 X-Source-Auth: tom+tromey.com X-Email-Count: 22 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfF+6Nh9BM5xFwbnfUbZekyCa7G1iMxO4U8rxDt89dkNH9vSoxLckn2MWCsZOuoUyFOw/TSfIgk0FGUQF2ujGcBit2Du9ht+G3JepE5x6j8WQyKOm6ne0 PVyZakRe+//2I7kpqwXGaZ6x5Tpm5xsaKPcHg56RFSTDN26Dk0NLgakUACbYfVKeCglkCxX5hDI3FS9FMIdEhoOnxHb+tdTxkms= X-Spam-Status: No, score=-3015.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 >>>>> "Will" == Will Hawkins writes: Will> The current implementation of search_command_helper accesses the line Will> offsets of the current program spaces's source code through Will> the source cache but then accesses its contents through the disk. This Will> PR updates the implementation so that the access of the contents is also Will> through the source cache. It seems to me that this will result in some changes, because the source cache may hold text that has had styling applied, and so may have embedded ANSI escape sequences -- which the search command isn't expecting. If this is needed for your source-embedding work then perhaps the source cache should store an unmodified copy of the source as well, at least in the case that styles have been applied. Tom