From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50306 invoked by alias); 4 Sep 2019 17:22:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 50293 invoked by uid 89); 4 Sep 2019 17:22:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=sk:source X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Sep 2019 17:22:57 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2E76DAFF0; Wed, 4 Sep 2019 17:22:55 +0000 (UTC) Subject: Re: [PATCH v2 2/2] Add Rust support to source highlighting To: Tom Tromey , gdb-patches@sourceware.org References: <20190727155155.32417-1-tom@tromey.com> <20190727155155.32417-3-tom@tromey.com> Cc: Pedro Alves From: Tom de Vries Openpgp: preference=signencrypt Message-ID: <332da42c-ae75-a148-221f-4f7bb815f40f@suse.de> Date: Wed, 04 Sep 2019 17:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190727155155.32417-3-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00030.txt.bz2 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. Hi, I recently updated my regular build setup to include an installed libsource-highlight.so 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? Thanks, - Tom