This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Don't munge yacc's #line directives
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: gdb-patches at sourceware dot org
- Cc: Patrick Palka <patrick at parcs dot ath dot cx>
- Date: Wed, 7 Jan 2015 20:01:18 -0500
- Subject: [PATCH] Don't munge yacc's #line directives
- Authentication-results: sourceware.org; auth=none
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. 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
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:
--
2.2.1.212.gc5b9256