mirror of
https://github.com/golang/go
synced 2024-11-18 18:44:42 -07:00
[dev.cc] cmd/asm: set the flags to production settings (turn off debug)
Set -S to false and add -debug to control the other debugging print. Change-Id: I864866c3d264a33e6dd0ce12a86a050a5fe0f875 Reviewed-on: https://go-review.googlesource.com/3453 Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
29428e322d
commit
36e5f4d53f
@ -11,6 +11,7 @@ import (
|
||||
|
||||
"cmd/asm/internal/addr"
|
||||
"cmd/asm/internal/arch"
|
||||
"cmd/asm/internal/flags"
|
||||
"cmd/asm/internal/lex"
|
||||
"cmd/internal/obj"
|
||||
)
|
||||
@ -140,8 +141,10 @@ func (p *Parser) append(prog *obj.Prog, doLabel bool) {
|
||||
p.pendingLabels = p.pendingLabels[0:0]
|
||||
}
|
||||
prog.Pc = int64(p.pc)
|
||||
if *flags.Debug {
|
||||
fmt.Println(p.histLineNum, prog)
|
||||
}
|
||||
}
|
||||
|
||||
// asmText assembles a TEXT pseudo-op.
|
||||
// TEXT runtime·sigtramp(SB),4,$0-0
|
||||
|
@ -14,8 +14,9 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
OutputFile = flag.String("o", "", "output file; default foo.6 for /a/b/c/foo.s on arm64 (unused TODO)")
|
||||
PrintOut = flag.Bool("S", true, "print assembly and machine code") // TODO: set to false
|
||||
Debug = flag.Bool("debug", false, "dump instructions as they are parsed")
|
||||
OutputFile = flag.String("o", "", "output file; default foo.6 for /a/b/c/foo.s on amd64")
|
||||
PrintOut = flag.Bool("S", false, "print assembly and machine code")
|
||||
TrimPath = flag.String("trimpath", "", "remove prefix from recorded source file paths (unused TODO)")
|
||||
)
|
||||
|
||||
|
@ -54,7 +54,7 @@ func main() {
|
||||
var ok bool
|
||||
pList.Firstpc, ok = parser.Parse()
|
||||
if !ok {
|
||||
log.Print("FAIL TODO")
|
||||
log.Fatalf("asm: assembly of %s failed", flag.Arg(0))
|
||||
os.Exit(1)
|
||||
}
|
||||
obj.Writeobjdirect(ctxt, output)
|
||||
|
Loading…
Reference in New Issue
Block a user