From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gKPaBpnwImZMYjUAWB0awg (envelope-from ) for ; Fri, 19 Apr 2024 18:30:49 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=obs-cr.20230601.gappssmtp.com header.i=@obs-cr.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=Bbeq+RtO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 166231E0C0; Fri, 19 Apr 2024 18:30:49 -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 03B041E030 for ; Fri, 19 Apr 2024 18:30:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB2CF384AB52 for ; Fri, 19 Apr 2024 22:30:46 +0000 (GMT) Received: from mail-oo1-xc2e.google.com (mail-oo1-xc2e.google.com [IPv6:2607:f8b0:4864:20::c2e]) by sourceware.org (Postfix) with ESMTPS id 8356B3858D38 for ; Fri, 19 Apr 2024 22:30:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8356B3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=obs.cr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=obs.cr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8356B3858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713565827; cv=none; b=Vv2x+PUWSSmYw68814z5X/1vidKQEA5NSy+Z5O1SBrL5T6O2QQqn1XkOkcUJI77h2m3P3d6dHi6+AnA/xbyX9t4GvSmWLmlnDdkwBfNU4C6Bshvf3okwYd3bPcKaGYbD2td7Y1paEjhmD2Bjsgp2cVq0xLGxnDv5ducY7Y48+qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713565827; c=relaxed/simple; bh=z/IIms78WnG2Vxu8nlyEbuOozm2+s5rS/mgyh/P+n2E=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=hpGZQOqV94+BGSC1OgNl5z98vtuw4Rb5f6+EimHFfACo4zaA9iPQKEyrfNeVOygoMl+YQBJcjiVq/D8Q50b9SWEmAKBdiHONJ/a3ZrfEf0+Rq65+O+0UCXdbpWZB5D7xba72iP5B8hzh6ELzakth2Hk0Ou0HowLM5so5/X+s8Fo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5aa17c29ba0so1445167eaf.3 for ; Fri, 19 Apr 2024 15:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=obs-cr.20230601.gappssmtp.com; s=20230601; t=1713565825; x=1714170625; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z/IIms78WnG2Vxu8nlyEbuOozm2+s5rS/mgyh/P+n2E=; b=Bbeq+RtO+fYveszcLERWnEQkRBYQ69OpPjMuKDmQRQ9p8RQN8gI260JvJDtIJ1T2Bv SRpNft6uFvQ+UB0kJmrnA8m6X08lss2KhwzCXzaZw2QmfiyxhluaaB+ljxOE1srLge3Y UaKuqJN5/uIZc1a25Q7wqnp7PuA/RHSuQSXBi6EQtPaKu65UAUk7c0OmFmkslkumN6Qw FhfBZhacqdm9IOQVi2yYVzE8s0ItDtYLTyVNBlgM+JGzMfLbB9F3KsstdOrrIzE0WG0T +orzpNopyp9Ibs00rhn0zj2Wz4PYuf1g3pynHvr2v7JPdOztDJC5TQgpFCdfZ1o6uL3O ZuDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713565825; x=1714170625; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z/IIms78WnG2Vxu8nlyEbuOozm2+s5rS/mgyh/P+n2E=; b=OvbTDLNVLMkECQX5em/wgoDik6NHK/Oik3xI5SHXO2OA0ekHXXs+iZ1Y3iDLdc7hKF 4TuaWdx5xmSHaVU2A621EPN6TNyGe0cguv0syBoZRrv9rJxXBm61NwgYuHY7bj7CxflA HCg9sw1/i1ms/X40s1eT0HMPK55FQZt9HdxVGBO+ed+cWnHCPrWyf+AqO/gQt/Pf4Es3 Am2yteg+x2Mi9oXu8n6tz/URcCVduVq5PaqtXboXRfZW5j0r++RmBTxHUdpPKrKiJFdN ffxeHoEvGvmiRYoJ+vk9DwBSf7L5+cDuEWuuxx+1G/TOJ+HRAwVvJrGITRBBuEXBfU9Y tLIA== X-Gm-Message-State: AOJu0YzzZmODGM2/2LmiwluM6lBfvXCGPLQHXj0ZA1qhuNiBZjWO35uh FQwoLrPQcJBR8mWryMOKBv79NT/R7wi9+xCDCPaEOVOtnm3ytbqd3UDDXu8a2dDwPdBZGopvBDX A0qxGjQRzaqgHtnX+aq8FrJfOTp9CUtCUAKc+oz1hfdUEkGp9 X-Google-Smtp-Source: AGHT+IEL/iPSjJ7xEgDZVqao81fgank8BzYVq5t7UNuhkABOi33IytLW6xAWWte13/gUoQuUU+hr1WRFyr6Z6dwAx1E= X-Received: by 2002:a05:6358:6a44:b0:183:645b:cfa5 with SMTP id c4-20020a0563586a4400b00183645bcfa5mr4846993rwh.15.1713565824800; Fri, 19 Apr 2024 15:30:24 -0700 (PDT) MIME-Version: 1.0 References: <20240324011828.145140-1-hawkinsw@obs.cr> <20240325140103.157217-1-hawkinsw@obs.cr> <8734rhuoo2.fsf@tromey.com> In-Reply-To: <8734rhuoo2.fsf@tromey.com> From: Will Hawkins Date: Fri, 19 Apr 2024 18:30:14 -0400 Message-ID: Subject: Re: [PATCH v2] Make source.c:search_command_helper use source cache To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham 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 On Fri, Apr 19, 2024 at 3:40=E2=80=AFPM Tom Tromey wrote: > > >>>>> "Will" =3D=3D Will Hawkins writes: > > Will> The current implementation of search_command_helper accesses the li= ne > Will> offsets of the current program spaces's source code through > Will> the source cache but then accesses its contents through the disk. T= his > 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. Interesting, I didn't notice that. > > 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. It is part of that work, yes. I hoped that by consolidating access to the source code through the cache it would also streamline other parts of the code. I will take your advise on storing a second copy and spin another revision of the code. Thank you for the feedback! Will > > Tom