diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-11-29 10:40:36 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-11-30 13:33:18 +0100 |
| commit | 1fd901159188a5e0c2b3559ae7ec7deff7c4e7a2 (patch) | |
| tree | 82c9a88630b01824aab94866cbe1d405a7e7219d /pkg/repro | |
| parent | a142e60d5cf11dc798e4909c97803d75add83a11 (diff) | |
pkg/mgrconfig: add prog&sys.targets targets to Config
These are widely used with the config as the refactoring shows.
This removes a bunch of unnecessary code.
Also fixes a number of bugs where we confused Arch with VMArch.
Diffstat (limited to 'pkg/repro')
| -rw-r--r-- | pkg/repro/repro.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 41a3a5874..930127901 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -67,11 +67,7 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, features *host.Features, report if len(vmIndexes) == 0 { return nil, nil, fmt.Errorf("no VMs provided") } - target, err := prog.GetTarget(cfg.TargetOS, cfg.TargetArch) - if err != nil { - return nil, nil, err - } - entries := target.ParseLog(crashLog) + entries := cfg.Target.ParseLog(crashLog) if len(entries) == 0 { return nil, nil, fmt.Errorf("crash log does not contain any programs") } @@ -101,7 +97,7 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, features *host.Features, report timeouts = []time.Duration{noOutputTimeout} } ctx := &context{ - target: targets.Get(cfg.TargetOS, cfg.TargetArch), + target: cfg.SysTarget, reporter: reporter, crashTitle: crashTitle, crashType: crashType, |
