pkg/proc: Refactor process post initialization

This patch is a slight refactor to share more code used for genericprocess initialization. There will always be OS/backend specificinitialization, but as much as can be shared should be to preventduplicating of any logic (setting internal breakpoints, loading bininfo,etc).
This commit is contained in:
Derek Parker
2018-11-12 14:52:13 -08:00
committed by Alessandro Arzilli
parent 91953dd49c
commit d61cd1c0d7
13 changed files with 256 additions and 234 deletions

View File

@ -174,7 +174,7 @@ func withCoreFile(t *testing.T, name, args string) *Process {
p, err := OpenCore(corePath, fix.Path, []string{})
if err != nil {
t.Errorf("ReadCore(%q) failed: %v", corePath, err)
t.Errorf("OpenCore(%q) failed: %v", corePath, err)
pat, err := ioutil.ReadFile("/proc/sys/kernel/core_pattern")
t.Errorf("read core_pattern: %q, %v", pat, err)
apport, err := ioutil.ReadFile("/var/log/apport.log")