mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: accept string debug flags
The compiler's -d flag accepts string-valued flags, but currently only for SSA debug flags. Extend it to support string values for other flags. This also makes the syntax somewhat more sane so flag=value and flag:value now both accept integers and strings. Change-Id: Idd144d8479a430970cc1688f824bffe0a56ed2df Reviewed-on: https://go-review.googlesource.com/37345 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
5bfd1ef036
commit
8eb14e9de5
2 changed files with 26 additions and 18 deletions
|
|
@ -204,7 +204,7 @@ func PhaseOption(phase, flag string, val int, valString string) string {
|
|||
}
|
||||
}
|
||||
return "" +
|
||||
`GcFlag -d=ssa/<phase>/<flag>[=<value>]|[:<function_name>]
|
||||
`GcFlag -d=ssa/<phase>/<flag>[=<value>|<function_name>]
|
||||
<phase> is one of:
|
||||
` + phasenames + `
|
||||
<flag> is one of on, off, debug, mem, time, test, stats, dump
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue