This is the mail archive of the 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]

Re: [PATCH v2 2/2] Add Rust support to source highlighting

On 27-07-19 17:51, Tom Tromey wrote:
> 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.


I recently updated my regular build setup to include an installed by installing package libsource-highlight-devel
in openSUSE Leap 15.1.

Subsequently I ran into this error in the gdb 8.3 branch:
$ ./install/bin/gdb -q a.out -ex start
Reading symbols from a.out...
Temporary breakpoint 1 at 0x40053b: file hello.c, line 9.
Starting program: /data/gdb_versions/devel/a.out

Temporary breakpoint 1, main () at hello.c:9
terminate called after throwing an instance of 'srchilite::ParserException'
  what():  error during the parsing of a definition file
Aborted (core dumped)

This expection happens when the library attempts to access
/usr/share/source-highlight/esc.outlang, which is not there, because
it's contained in another package (source-highlight). Installing that
package fixes the error.

Nevertheless, the error did not occur on master, and I've bisect that
behaviour to this patch.

So my question is: does it make sense to backport (part of) this patch
to 8.3?

- Tom

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