Skip to content

Commit b836106

Browse files
aarzillithanm
authored andcommitted
cmd/compile: record regabi status in DW_AT_producer
Records if regabi was enabled during compilation in the DW_AT_producer attribute of each compile unit. This is useful to debuggers that support the debugCall protocol. Change-Id: I5ad2c48ebf126aeb8bfb459b53a1a5304550036a Reviewed-on: https://go-review.googlesource.com/c/go/+/318050 Trust: Dmitri Shuralyov <[email protected]> Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Than McIntosh <[email protected]> TryBot-Result: Go Bot <[email protected]>
1 parent a22e317 commit b836106

File tree

1 file changed

+8
-0
lines changed
  • src/cmd/compile/internal/dwarfgen

1 file changed

+8
-0
lines changed

src/cmd/compile/internal/dwarfgen/dwarf.go

+8
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,14 @@ func RecordFlags(flags ...string) {
531531
fmt.Fprintf(&cmd, " -%s=%v", f.Name, getter.Get())
532532
}
533533

534+
// Adds flag to producer string singalling whether regabi is turned on or
535+
// off.
536+
// Once regabi is turned on across the board and the relative GOEXPERIMENT
537+
// knobs no longer exist this code should be removed.
538+
if buildcfg.Experiment.RegabiArgs {
539+
cmd.Write([]byte(" regabi"))
540+
}
541+
534542
if cmd.Len() == 0 {
535543
return
536544
}

0 commit comments

Comments
 (0)