Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Will Hawkins <hawkinsw@obs.cr>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Make source.c:search_command_helper use source cache
Date: Fri, 19 Apr 2024 18:30:14 -0400	[thread overview]
Message-ID: <CADx9qWiGU9v4NHFYfnHTOMPpurswVZYZUDmC-upo4WqQnNcmvg@mail.gmail.com> (raw)
In-Reply-To: <8734rhuoo2.fsf@tromey.com>

On Fri, Apr 19, 2024 at 3:40 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Will" == Will Hawkins <hawkinsw@obs.cr> 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.

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

      reply	other threads:[~2024-04-19 22:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24  1:18 [PATCH] " Will Hawkins
2024-03-25 14:00 ` [PATCH v2] " Will Hawkins
2024-03-29 14:46   ` Will Hawkins
2024-04-08 18:12     ` Will Hawkins
2024-04-18  1:28       ` Will Hawkins
2024-04-19 19:41     ` Tom Tromey
2024-04-19 22:28       ` Will Hawkins
2024-04-19 19:40   ` Tom Tromey
2024-04-19 22:30     ` Will Hawkins [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADx9qWiGU9v4NHFYfnHTOMPpurswVZYZUDmC-upo4WqQnNcmvg@mail.gmail.com \
    --to=hawkinsw@obs.cr \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox