This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: easier debugging of jc1

This patch causes gcc/java/ to run `bison' from builddir,
not srcdir.  This gets the `#line' directives in parse.c to list the
srcdir.  That way gdb can automatically find parse.y when debugging --
no more `dir' command every time you debug jc1.

This has been a long-time annoyance and so today I investigated it.

I'd like to check this in on the branch as well as the trunk (since
I'm doing most of my debugging on the branch).


2001-03-21  Tom Tromey  <>

	* ($(srcdir)/java/parse-scan.c): Run bison from build
	($(srcdir)/java/parse.c): Likewise.


RCS file: /cvs/gcc/gcc/gcc/java/,v
retrieving revision
diff -u -r1.52.2.1
---	2001/02/16 17:53:28
+++	2001/03/21 22:42:11
@@ -80,14 +80,13 @@
 $(INTL_TARGETS): $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c
 $(srcdir)/java/parse.c: $(srcdir)/java/parse.y
-	(cd $(srcdir)/java && \
-	$(BISON) -t --name-prefix=java_ $(BISONFLAGS) -o p$$$$.c parse.y && \
-	mv -f p$$$$.c parse.c)
+	$(BISON) -t --name-prefix=java_ $(BISONFLAGS) \
+	    -o p$$$$.c $(srcdir)/java/parse.y && \
+	mv -f p$$$$.c $(srcdir)/java/parse.c
 $(srcdir)/java/parse-scan.c:  $(srcdir)/java/parse-scan.y
-	(cd $(srcdir)/java && \
-	$(BISON) -t $(BISONFLAGS) -o ps$$$$.c parse-scan.y && \
-	mv -f ps$$$$.c parse-scan.c)
+	$(BISON) -t $(BISONFLAGS) -o ps$$$$.c $(srcdir)/java/parse-scan.y && \
+	mv -f ps$$$$.c $(srcdir)/java/parse-scan.c
 $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
 	(cd $(srcdir)/java || exit 1; \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]