binutils-gdb/gdb/tui
Tom Tromey 62f29fda90 Highlight source code using GNU Source Highlight
This changes gdb to highlight source using GNU Source Highlight, if it
is available.

This affects the output of the "list" command and also the TUI source
window.

No new test because I didn't see a way to make it work when Source
Highlight is not found.

gdb/ChangeLog
2018-12-28  Tom Tromey  <tom@tromey.com>

	* utils.h (can_emit_style_escape): Declare.
	* utils.c (can_emit_style_escape): No longer static.
	* cli/cli-style.c (set_style_enabled): New function.
	(_initialize_cli_style): Use it.
	* tui/tui-winsource.c (tui_show_source_line): Use tui_puts.
	(tui_alloc_source_buffer): Change how source lines are allocated.
	* tui/tui-source.c (copy_source_line): New function.
	(tui_set_source_content): Use source cache.
	* tui/tui-io.h (tui_puts): Update.
	* tui/tui-io.c (tui_puts_internal): Add window parameter.
	(tui_puts): Likewise.
	(tui_redisplay_readline): Update.
	* tui/tui-data.c (free_content_elements): Change how source window
	contents are freed.
	* source.c (forget_cached_source_info): Clear the source cache.
	(print_source_lines_base): Use the source cache.
	* source-cache.h: New file.
	* source-cache.c: New file.
	* configure.ac: Check for GNU Source Highlight library.
	* configure: Update.
	* config.in: Update.
	* Makefile.in (SRCHIGH_LIBS, SRCHIGH_CFLAGS): New variables.
	(INTERNAL_CFLAGS_BASE): Add SRCHIGH_CFLAGS.
	(CLIBS): Add SRCHIGH_LIBS.
	(COMMON_SFILES): Add source-cache.c.
	(HFILES_NO_SRCDIR): Add source-cache.h.
2018-12-28 12:49:54 -07:00
..
ChangeLog-1998-2003
tui-command.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-command.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-data.c Highlight source code using GNU Source Highlight 2018-12-28 12:49:54 -07:00
tui-data.h Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-disasm.c Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-disasm.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-file.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-file.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-hooks.c Fix compile error with clang 3.8 2018-12-21 11:45:16 -05:00
tui-hooks.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-interp.c Avoid find_thread_ptid with null_ptid 2018-11-22 16:09:12 +00:00
tui-io.c Highlight source code using GNU Source Highlight 2018-12-28 12:49:54 -07:00
tui-io.h Highlight source code using GNU Source Highlight 2018-12-28 12:49:54 -07:00
tui-layout.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-layout.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-out.c Add output styles to gdb 2018-12-28 12:49:49 -07:00
tui-out.h Add output styles to gdb 2018-12-28 12:49:49 -07:00
tui-regs.c Introduce gdbarch_num_cooked_regs 2018-10-21 22:29:21 -04:00
tui-regs.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-source.c Highlight source code using GNU Source Highlight 2018-12-28 12:49:54 -07:00
tui-source.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-stack.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
tui-stack.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-win.c Deprecate and replace the "tabset" command 2018-10-19 17:22:27 -06:00
tui-win.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-windata.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-windata.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-wingeneral.c Remove unnecessary casts from TUI 2018-10-15 23:01:32 -06:00
tui-wingeneral.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui-winsource.c Highlight source code using GNU Source Highlight 2018-12-28 12:49:54 -07:00
tui-winsource.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
tui.c Make ANSI terminal escape sequences work in TUI 2018-12-28 12:49:53 -07:00
tui.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00