This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Instantiate a single source highlighter


*** TEST RESULTS FOR COMMIT dcf3792354ddcd6e10e59e32060e34b27246e7da ***

Author: Tom Tromey <tromey@adacore.com>
Branch: master
Commit: dcf3792354ddcd6e10e59e32060e34b27246e7da

Instantiate a single source highlighter

It occurred to me that there's no reason to make a new source
highlighter each time gdb needs to highlight some source code.
Instead, a single one can be created and then simply reused each time.

This patch implements this idea.  Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-06-19  Tom Tromey  <tromey@adacore.com>

	* source-cache.c (highlighter): New global.
	(source_cache::get_source_lines): Create a highlighter on demand.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]