aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-11 16:58:27 -0800
committerRuss Cox <rsc@golang.org>2009-11-11 16:58:27 -0800
commitae3341476d4c7ece87758eccc8d927fa9ee2b5dc (patch)
treee2885a3cebcdd333171d6e93c835b38535307183
parentc3343ef62c6bc462cdf39a0de19e7ecc4e8ccc71 (diff)
downloadgo-ae3341476d4c7ece87758eccc8d927fa9ee2b5dc.tar.gz
go-ae3341476d4c7ece87758eccc8d927fa9ee2b5dc.zip
cgo: add more information about gcc output parsing failures
R=r https://golang.org/cl/152084
-rw-r--r--src/cmd/cgo/gcc.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index 6e9ba13b76..d6b5c6bc85 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -96,6 +96,10 @@ func (p *Prog) loadDebugInfo() {
}
}
+ if nerrors > 0 {
+ fatal("failed to interpret gcc output:\n%s", stderr)
+ }
+
// Extract the types from the DWARF section of an object
// from a well-formed C program. Gcc only generates DWARF info
// for symbols in the object file, so it is not enough to print the