aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objabi
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2017-10-17 17:09:54 -0400
committerAustin Clements <austin@google.com>2017-10-18 19:32:40 +0000
commit2c1d2e06afee98d0770427d8b6c29bd9971a0999 (patch)
tree110acaf7cc582f55e4b480bd07792c49a8b5e14e /src/cmd/internal/objabi
parent193088b246f4bbe9a7d3a84ec7f4cc6786dac043 (diff)
downloadgo-2c1d2e06afee98d0770427d8b6c29bd9971a0999.tar.xz
cmd/compile, cmd/link: record compiler flags in DW_AT_producer
This adds a whitelisted subset of compiler flags to the DW_AT_producer DWARF attribute of each package compilation unit DIE. This is common practice in DWARF and can help debuggers determine the quality of the produced debugging information. Fixes #22168. Change-Id: I1b994ef2262aa9b88b68eb6e883695d1103acc58 Reviewed-on: https://go-review.googlesource.com/71430 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/internal/objabi')
-rw-r--r--src/cmd/internal/objabi/flag.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/internal/objabi/flag.go b/src/cmd/internal/objabi/flag.go
index 388698332d..8f611c9ec9 100644
--- a/src/cmd/internal/objabi/flag.go
+++ b/src/cmd/internal/objabi/flag.go
@@ -94,10 +94,18 @@ func (c *count) Set(s string) error {
return nil
}
+func (c *count) Get() interface{} {
+ return int(*c)
+}
+
func (c *count) IsBoolFlag() bool {
return true
}
+func (c *count) IsCountFlag() bool {
+ return true
+}
+
type fn0 func()
func (f fn0) Set(s string) error {