From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7763 invoked by alias); 10 Jan 2014 13:24:17 -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 7751 invoked by uid 89); 10 Jan 2014 13:24:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f174.google.com Received: from mail-qc0-f174.google.com (HELO mail-qc0-f174.google.com) (209.85.216.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 10 Jan 2014 13:24:14 +0000 Received: by mail-qc0-f174.google.com with SMTP id x13so2819370qcv.19 for ; Fri, 10 Jan 2014 05:24:12 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.49.52.34 with SMTP id q2mr7409606qeo.10.1389360252432; Fri, 10 Jan 2014 05:24:12 -0800 (PST) Received: by 10.229.195.196 with HTTP; Fri, 10 Jan 2014 05:24:12 -0800 (PST) In-Reply-To: <87zjn47ref.fsf@fleche.redhat.com> References: <87zjn47ref.fsf@fleche.redhat.com> Date: Fri, 10 Jan 2014 13:24:00 -0000 Message-ID: Subject: Re: [PATCH 5/5] Fix for D demangling in GDB From: Iain Buclaw To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00278.txt.bz2 On 9 January 2014 21:54, Tom Tromey wrote: >>>>>> "Iain" == Iain Buclaw writes: > > Iain> * d-lang.h (d_parse_symbol): Add declaration. > Iain> * d-lang.c (extract_identifiers) > Iain> (extract_type_info): Remove functions. > Iain> (d_demangle): Use d_parse_symbol implemented in d-support.c to > Iain> demangle D symbols. > Iain> * d-support.c: New file. > > The usual approach in cases like this is to do a "pure move" patch to > move the functions to another file, followed by a second patch to > implement the fixes. > OK, I'll split it into two separate patches. > It's also worth noting that with a bit more work you could push the D > demangler into libiberty (see ada_demangle there) and then get > demangling from "nm" and the other binutils. > That sounds like a good plan. I'll keep a note to get round to do that. > Iain> +proc catch_demangling_errors {command} { > Iain> + if {[catch $command result]} { > Iain> + puts "ERROR: demangle.exp: while running $command: $result" > Iain> + } > Iain> +} > > Iain> + # Using catch_demangling_errors this way ensures that, if one of > Iain> + # the functions raises a Tcl error, then it'll get reported, and > Iain> + # the rest of the functions will still run. > Iain> + catch_demangling_errors test_d_demangling > > I don't think this stuff is needed. Usually we just let Tcl errors keep > going, since ordinarily they represent bugs in the test case. Is there > a particular failure you were seeing? > This was copied from cp-demangle.exp. I believe it is written that way so that all demangle tests are ran, rather than stopping at the first error?