From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2432 invoked by alias); 8 Jan 2015 12:49: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 2417 invoked by uid 89); 8 Jan 2015 12:49:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pa0-f54.google.com Received: from mail-pa0-f54.google.com (HELO mail-pa0-f54.google.com) (209.85.220.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 12:49:16 +0000 Received: by mail-pa0-f54.google.com with SMTP id fb1so11564089pad.13 for ; Thu, 08 Jan 2015 04:49:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=zB2x7h+PDhpaQ9zs0Xeyj5JxAk7lkh5vpDaO+pMqF54=; b=NECsuFnhIPwR5wbTNwufPsIctjHLYi65jksdI5dWFk3dcFT1y8xdMRWc8QmRkHrHp6 H4C1Jv/47gcpKgB8DGPoYcTlAhLo2ax1QOfCaCz4nKNNcaMeQlj8PtKh5IqZ/XruAIJC l6053d7lu4bJfydfjnwbOh2I2st/ao3IDPlOmK8NnrExftUSKqNVvBZGTL7HZkNWpuOD rDjUrGr3VSzegowY/NMznhetN2cnk9wJvwNaKyluGlJ1VSVwLWw2YIWX2wk0cSV9d4oS uCxMc0QP+97UCHyhl5bJUyTUrwO8sTw5oZuF7HxwAd0WFHr+jD9FdKMOTaeRczyB6iFE H+VA== X-Gm-Message-State: ALoCoQlnh6Kvlpgt4ghkpXVcJ5cgMDDXqbKozE8+xRx+kLuIf6twAznAKBnkWx52jah4zCACYljx X-Received: by 10.70.64.197 with SMTP id q5mr14398884pds.129.1420721353801; Thu, 08 Jan 2015 04:49:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 04:48:53 -0800 (PST) In-Reply-To: References: <1420678878-14065-1-git-send-email-patrick@parcs.ath.cx> <54AE71D2.6020301@redhat.com> From: Patrick Palka Date: Thu, 08 Jan 2015 12:49:00 -0000 Message-ID: Subject: Re: [PATCH] Don't munge yacc's #line directives To: Pedro Alves Cc: gdb-patches@sourceware.org, Jan Kratochvil Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-01/txt/msg00176.txt.bz2 On Thu, Jan 8, 2015 at 7:24 AM, Patrick Palka wrote: > On Thu, Jan 8, 2015 at 7:02 AM, Pedro Alves wrote: >> On 01/08/2015 01:01 AM, Patrick Palka wrote: >>> The #line directives within GDB's autogenerated yacc files (e.g. >>> c-exp.c) are being munged by a dubious sed expression that is causing >>> these directives to refer to nonexistent source files. As a result it >>> is currently not possible to debug these source files at source level. >>> >>> The culprit sed expression was added by commit 954d8cae for non-obvious >>> reasons. >> >> That predates when we started putting more complete descriptions >> in the commit log. Did you look for the mailing list patch submission? >> That should have included a description. If not, then maybe Jan >> recalls. The expression refers to basename and slashes, it makes >> me wonder whether this was build-in-srcdir vs build-out-of-srcdir >> related. > > Here is the corresponding ML listing: > https://sourceware.org/ml/gdb-patches/2010-11/msg00265.html > So it seems that ylwrap once used relative paths when referring to the > source yacc file instead of absolute paths, and the sed expression was > there to fix that. But our copy of ylwrap doesn't seem to have this > problem anymore. > >> >> >>> My guess is that the expression was added to work around a bug >>> in ylwrap which has since been fixed upstream: if I revert the November >>> 2014 update to ylwrap, commit be3046511, then the culprit sed line no >> >> OOC, got url for that git repo? > > Oops, I truncated the commit hash too much. The commit in question is > e30465112 from within the binutils-gdb repo. The commit synced some > files with upstream automake whose git repo is > http://git.savannah.gnu.org/cgit/automake.git. Here is the upstream automake patch that is probably responsible for making the sed expression in question obsolete: http://git.savannah.gnu.org/cgit/automake.git/commit/lib/ylwrap?id=b6359a5f310160c8a4a2e8e8c0105408412ce400 > >> >> Thanks, >> Pedro Alves >> >>> longer causes the above mentioned issue. >>> >>> So this patch removes the culprit sed script since it does not seem >>> needed anymore; the emitted #line directives look and work fine without >>> it. >>> >>> gdb/ChangeLog: >>> >>> 2015-01-07 Patrick Palka >>> >>> * Makefile.in (.y.c): Don't munge yacc's #line >>> directives. >>> --- >>> gdb/Makefile.in | 1 - >>> 1 file changed, 1 deletion(-) >>> >>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in >>> index 31c8a4c..97d0045 100644 >>> --- a/gdb/Makefile.in >>> +++ b/gdb/Makefile.in >>> @@ -1856,7 +1856,6 @@ po/$(PACKAGE).pot: force >>> -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ >>> -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ >>> -e '/^#line.*y.tab.c/d' \ >>> - -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \ >>> < $@.tmp > $@ >>> rm -f $@.tmp >>> .l.c: >>> >> >>