Patch: easier debugging of jc1

Tom Tromey tromey@redhat.com
Wed Mar 21 14:46:00 GMT 2001


This patch causes gcc/java/Make-lang.in 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).

Ok?

2001-03-21  Tom Tromey  <tromey@redhat.com>

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

Tom

Index: Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.52.2.1
diff -u -r1.52.2.1 Make-lang.in
--- Make-lang.in	2001/02/16 17:53:28	1.52.2.1
+++ Make-lang.in	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; \



More information about the Java-patches mailing list