diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-24 16:02:47 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-08-19 10:17:27 -0600 |
commit | d806ea2d0ef362fcddd2c1659f537b68aa114203 (patch) | |
tree | 98a15b8aa7aa4a70d552bb115a60a465478f8ec7 /gdb/configure | |
parent | c1a5d03a89a455d79f025c66dce83342de4d26ce (diff) | |
download | gdb-d806ea2d0ef362fcddd2c1659f537b68aa114203.zip gdb-d806ea2d0ef362fcddd2c1659f537b68aa114203.tar.gz gdb-d806ea2d0ef362fcddd2c1659f537b68aa114203.tar.bz2 |
Add Rust support to source highlighting
Currently, no release of GNU Source Highlight supports Rust. However,
I've checked in a patch to do so there, and I plan to make a new
release sometime this summer.
This patch prepares gdb for that by adding support for Rust to the
source highlighting code.
Because Source Highlight will throw an exception if the language is
unrecognized, this also changes gdb to ignore exceptions here. This
will cause gdb to fall back to un-highlighted source text.
This updates gdb's configure script to reject the combination of
Source Highlight and -static-libstdc++. This is done because it's not
possible to use -static-libstdc++ and then catch exceptions from a
shared library.
Tested with the current and development versions of Source Highlight.
gdb/ChangeLog
2019-08-19 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Disallow the combination of -static-libstdc++ and
source highlight.
* source-cache.c (get_language_name): Handle rust.
(source_cache::get_source_lines): Ignore highlighting exceptions.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure index 2832c83..cb71bbf 100755 --- a/gdb/configure +++ b/gdb/configure @@ -11326,6 +11326,12 @@ $as_echo "no - pkg-config not found" >&6; } as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 fi else + case "$LDFLAGS" in + *static-libstdc*) + as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 + ;; + esac + if ${pkg_config_prog_path} --exists source-highlight; then SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` |