From: Luuk van Dijk Date: Tue, 17 Aug 2010 22:16:05 +0000 (+0200) Subject: runtime: correct line numbers for .goc files. X-Git-Tag: weekly.2010-08-25~40 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=340f28deabf1264ce48ff0423021f34a31543f9d;p=gostls13.git runtime: correct line numbers for .goc files. 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 --- diff --git a/src/pkg/runtime/Makefile b/src/pkg/runtime/Makefile index 6571d802d4..a8e7bc7509 100644 --- a/src/pkg/runtime/Makefile +++ b/src/pkg/runtime/Makefile @@ -132,7 +132,7 @@ version.go: mkversion ./mkversion >version.go %.c: %.goc goc2c - ./goc2c $< > $@.tmp + ./goc2c `pwd`/$< > $@.tmp mv -f $@.tmp $@ %.$O: $(GOARCH)/%.c diff --git a/src/pkg/runtime/goc2c.c b/src/pkg/runtime/goc2c.c index 385b885855..826ceff3ab 100644 --- a/src/pkg/runtime/goc2c.c +++ b/src/pkg/runtime/goc2c.c @@ -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 {