Instantiate a single source highlighter
authorTom Tromey <tromey@adacore.com>
Tue, 18 Jun 2019 18:18:24 +0000 (12:18 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 19 Jun 2019 11:34:51 +0000 (05:34 -0600)
commitdcf3792354ddcd6e10e59e32060e34b27246e7da
tree4f448b277584ac9c09a49cfd242dffcf2e39ae65
parent6f5601c4d0ad43254244f1b624900cdd5afd02ba
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.
gdb/ChangeLog
gdb/source-cache.c
This page took 0.027597 seconds and 4 git commands to generate.