diff --git a/src/cmd/5g/gobj.c b/src/cmd/5g/gobj.c index b562ba888ba..2763e7b1673 100644 --- a/src/cmd/5g/gobj.c +++ b/src/cmd/5g/gobj.c @@ -198,7 +198,8 @@ dumpfuncs(void) if(isblank(pl->name)) continue; - if(debug['S']) { + // -S prints code; -SS prints code and data + if(debug['S'] && (pl->name || debug['S']>1)) { s = S; if(pl->name != N) s = pl->name->sym; diff --git a/src/cmd/6g/gobj.c b/src/cmd/6g/gobj.c index 80de2f750b8..8c9208374a4 100644 --- a/src/cmd/6g/gobj.c +++ b/src/cmd/6g/gobj.c @@ -244,7 +244,8 @@ dumpfuncs(void) if(isblank(pl->name)) continue; - if(debug['S']) { + // -S prints code; -SS prints code and data + if(debug['S'] && (pl->name || debug['S']>1)) { s = S; if(pl->name != N) s = pl->name->sym; diff --git a/src/cmd/8g/gobj.c b/src/cmd/8g/gobj.c index d8c8f5ab9fe..da0055cd9b9 100644 --- a/src/cmd/8g/gobj.c +++ b/src/cmd/8g/gobj.c @@ -242,7 +242,8 @@ dumpfuncs(void) if(isblank(pl->name)) continue; - if(debug['S']) { + // -S prints code; -SS prints code and data + if(debug['S'] && (pl->name || debug['S']>1)) { s = S; if(pl->name != N) s = pl->name->sym; diff --git a/src/cmd/gc/doc.go b/src/cmd/gc/doc.go index 163d3862c31..8d8f8967b71 100644 --- a/src/cmd/gc/doc.go +++ b/src/cmd/gc/doc.go @@ -47,7 +47,9 @@ Flags: -N disable optimizations -S - write assembly language text to standard output + write assembly language text to standard output (code only) + -SS + write assembly language text to standard output (code and data) -u disallow importing packages not marked as safe -V