From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8038 invoked by alias); 8 Jan 2015 12:25:09 -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 8027 invoked by uid 89); 8 Jan 2015 12:25:07 -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-pd0-f172.google.com Received: from mail-pd0-f172.google.com (HELO mail-pd0-f172.google.com) (209.85.192.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 12:25:06 +0000 Received: by mail-pd0-f172.google.com with SMTP id y13so10990144pdi.3 for ; Thu, 08 Jan 2015 04:25:04 -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=TBqLobbGQzj8LIXG4t1wW5espl5paKMf3ujdZaViKHU=; b=SPNgYylwXrUHm9jOto49CwnKWY8DSGwRrkce+RvdIoXP6czrrCWRpyaQQ3U5jZ91z1 gDBwhr2Y98N39ouRGI897JLtREorXv0g1Q6z8vTRS8n52IsUiO2PLlCbqzM+wCgBFoIf qj9BjjTG2EvNGprvWElSviM+LMtSMDtZkVMJwRoxbOOebfC1M6CukKQjIu8hjVQQIcxV KlxQZWFj2LcSVObAdk04CheW92mnXfSbOYqUnTq+pCHU0x4FOoMCa6T3Ydv0XFJk0a+E Nc8k121Cv/Cw0g/itHS3dNNlRt4EqiQkoLWfEk9m6MvHyyoPnr2PaBFaIB5SATyd3osz 6XWA== X-Gm-Message-State: ALoCoQlXo6C51LGf+bfxA1LeC/oi5vXxUZ0n1kYeNq133fV949YaYbdjJmZDOPIpVm18dhZNndCK X-Received: by 10.70.53.161 with SMTP id c1mr14321132pdp.140.1420719904636; Thu, 08 Jan 2015 04:25:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 04:24:44 -0800 (PST) In-Reply-To: <54AE71D2.6020301@redhat.com> References: <1420678878-14065-1-git-send-email-patrick@parcs.ath.cx> <54AE71D2.6020301@redhat.com> From: Patrick Palka Date: Thu, 08 Jan 2015 12:25: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/msg00173.txt.bz2 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. > > 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: >> > >