tools/syz-symbolize: add optional arch flag with sensible default

The manager config passed to NewReporter() must include a valid arch by now.
This commit is contained in:
Anton Lindqvist 2018-12-08 16:24:24 +01:00 committed by Dmitry Vyukov
parent 4e1aade2fe
commit 977de94f01

View File

@ -16,6 +16,7 @@ import (
var (
flagOS = flag.String("os", runtime.GOOS, "target os")
flagArch = flag.String("arch", runtime.GOARCH, "target arch")
flagKernelSrc = flag.String("kernel_src", ".", "path to kernel sources")
flagKernelObj = flag.String("kernel_obj", ".", "path to kernel build/obj dir")
)
@ -28,9 +29,10 @@ func main() {
os.Exit(1)
}
cfg := &mgrconfig.Config{
TargetOS: *flagOS,
KernelObj: *flagKernelObj,
KernelSrc: *flagKernelSrc,
TargetOS: *flagOS,
TargetArch: *flagArch,
KernelObj: *flagKernelObj,
KernelSrc: *flagKernelSrc,
}
reporter, err := report.NewReporter(cfg)
if err != nil {