Commit bb215de8 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/internal/obj: pretty-print LSym.Type when debugging

We have a stringer for LSym.Type. Use it.

Before:

	"".algarray t=31 size=224

After:

	"".algarray SBSS size=224

Change-Id: Ib4c7d2bc1dbe9943cf2a5dfa5d9f2d7fbd50b7f2
Reviewed-on: https://go-review.googlesource.com/40862
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 3d0a8983
...@@ -318,7 +318,7 @@ func (w *objWriter) writeSymDebug(s *LSym) { ...@@ -318,7 +318,7 @@ func (w *objWriter) writeSymDebug(s *LSym) {
fmt.Fprintf(ctxt.Bso, "v=%d ", s.Version) fmt.Fprintf(ctxt.Bso, "v=%d ", s.Version)
} }
if s.Type != 0 { if s.Type != 0 {
fmt.Fprintf(ctxt.Bso, "t=%d ", s.Type) fmt.Fprintf(ctxt.Bso, "%v ", s.Type)
} }
if s.DuplicateOK() { if s.DuplicateOK() {
fmt.Fprintf(ctxt.Bso, "dupok ") fmt.Fprintf(ctxt.Bso, "dupok ")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment