Skip to content
  • Tom Tromey's avatar
    Add Rust support to source highlighting · 60cdff2f
    Tom Tromey authored
    [ Backport of master commit d806ea2d. ]
    
    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>
    
    	PR gdb/25009
    	* 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.
    60cdff2f