]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: correct line numbers for .goc files.
authorLuuk van Dijk <lvd@golang.org>
Tue, 17 Aug 2010 22:16:05 +0000 (00:16 +0200)
committerLuuk van Dijk <lvd@golang.org>
Tue, 17 Aug 2010 22:16:05 +0000 (00:16 +0200)
Linenumbers start at 1.
Also call goc2c with an absolute pathi to preserve debug info.

R=rsc, r, ken2
CC=golang-dev
https://golang.org/cl/1954049

src/pkg/runtime/Makefile
src/pkg/runtime/goc2c.c

index 6571d802d4df5ba3c36a631d55b1251ad5cc8620..a8e7bc7509134a63a2a76f013c3ecf69f8bdc300 100644 (file)
@@ -132,7 +132,7 @@ version.go: mkversion
        ./mkversion >version.go
 
 %.c:   %.goc goc2c
-       ./goc2c $< > $@.tmp
+       ./goc2c `pwd`/$< > $@.tmp
        mv -f $@.tmp $@
 
 %.$O:  $(GOARCH)/%.c
index 385b885855ba14461d36f7a73a7665585ad40ba1..826ceff3ab1d4819737723d20b3cfbb1f79380c4 100644 (file)
@@ -28,7 +28,7 @@ static int gcc;
 
 /* File and line number */
 static const char *file;
-static unsigned int lineno;
+static unsigned int lineno = 1;
 
 /* List of names and types.  */
 struct params {