summaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-02-24 23:44:05 -0500
committerCherry Mui <cherryyz@google.com>2022-03-15 18:37:49 +0000
commitdb3045b4be5b91cd42c3387dc550c89bbc2f7fb4 (patch)
tree288d52c868e1bded2aa79786a15dcc4390ca783a /src/cmd
parentb4428325e266d8ffdd1131d71862f0767c616e27 (diff)
downloadgo-git-db3045b4be5b91cd42c3387dc550c89bbc2f7fb4.tar.gz
cmd/asm: support -d=pctab flag
To debug PC data generation. Change-Id: Id7ac8d607cc27ad52db490bd758c3a768c3e1df2 Reviewed-on: https://go-review.googlesource.com/c/go/+/388015 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/asm/internal/flags/flags.go1
-rw-r--r--src/cmd/asm/main.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/flags/flags.go b/src/cmd/asm/internal/flags/flags.go
index 607166e664..273d422370 100644
--- a/src/cmd/asm/internal/flags/flags.go
+++ b/src/cmd/asm/internal/flags/flags.go
@@ -30,6 +30,7 @@ var (
var DebugFlags struct {
MayMoreStack string `help:"call named function before all stack growth checks"`
+ PCTab string `help:"print named pc-value table\nOne of: pctospadj, pctofile, pctoline, pctoinline, pctopcdata"`
}
var (
diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go
index 3683527f5b..6a25fd426b 100644
--- a/src/cmd/asm/main.go
+++ b/src/cmd/asm/main.go
@@ -43,6 +43,7 @@ func main() {
ctxt.Flag_linkshared = *flags.Linkshared
ctxt.Flag_shared = *flags.Shared || *flags.Dynlink
ctxt.Flag_maymorestack = flags.DebugFlags.MayMoreStack
+ ctxt.Debugpcln = flags.DebugFlags.PCTab
ctxt.IsAsm = true
ctxt.Pkgpath = *flags.Importpath
switch *flags.Spectre {