[PATCH v2] Make source.c:search_command_helper use source cache
Tom Tromey
tom@tromey.com
Fri Apr 19 19:40:13 GMT 2024
>>>>> "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.
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
More information about the Gdb-patches
mailing list