profile
viewpoint

Ask questionssyntax error when dumping method

$ compilecmp -dumpssa (*scanner).digits:*
-bash: syntax error near unexpected token `('

Put the method in single or double quotes:

$ compilecmp -dumpssa '(*scanner).digits:*'
...
dumping SSA for (*scanner).digits:*:
exit status 1
panic: exit status 1

goroutine 1 [running]:
log.Panic(0xc000321858, 0x1, 0x1)
        /home/erifan01/go-in-use/src/log/log.go:351 +0xac
main.check(...)
        /home/erifan01/gopath/src/compilecmp/main.go:393
main.dumpSSA(0x0, 0x0, 0x70e8fc, 0x6, 0xc000016180, 0xa, 0xc00001a720, 0x25, 0xc000290000, 0x70e2bf, ...)
        /home/erifan01/gopath/src/compilecmp/dumpssa.go:77 +0x1293
main.comparePlatform(0x0, 0x0, 0x70e8fc, 0x6, 0x70e2bf, 0x4)
        /home/erifan01/gopath/src/compilecmp/main.go:268 +0x92c
main.compare(0x70e8fc, 0x6, 0x70e2bf, 0x4)
        /home/erifan01/gopath/src/compilecmp/main.go:196 +0x112
main.main()
        /home/erifan01/gopath/src/compilecmp/main.go:124 +0x447

But we can dump this method with: GOSSAFUNC=(*scanner).digits:* go build cmd/compile/internal/syntax

josharian/compilecmp

Answer questions erifan

Enclosing the method with quotes doesn't fix the issue.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List