public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [PATCH] Don't munge yacc's #line directives
Date: Thu, 08 Jan 2015 12:25:00 -0000	[thread overview]
Message-ID: <CA+C-WL9R66V9M9b3nYad1AGYQna4DekAsAtemgm7FMQY4cqiPg@mail.gmail.com> (raw)
In-Reply-To: <54AE71D2.6020301@redhat.com>

On Thu, Jan 8, 2015 at 7:02 AM, Pedro Alves <palves@redhat.com> 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  <patrick@parcs.ath.cx>
>>
>>       * 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:
>>
>
>

  reply	other threads:[~2015-01-08 12:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  1:01 Patrick Palka
2015-01-08 12:02 ` Pedro Alves
2015-01-08 12:25   ` Patrick Palka [this message]
2015-01-08 12:49     ` Patrick Palka
2015-01-08 14:06       ` Pedro Alves
2015-01-09 22:23         ` Patrick Palka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+C-WL9R66V9M9b3nYad1AGYQna4DekAsAtemgm7FMQY4cqiPg@mail.gmail.com \
    --to=patrick@parcs.ath.cx \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).