proc: bugfix: status does not work with programs containing spaces

/proc/pid/stat needs more complex parsing

Fixes #239
This commit is contained in:
aarzilli
2015-10-04 20:16:39 +02:00
committed by Derek Parker
parent db95b67b23
commit e509c3ce36
6 changed files with 82 additions and 18 deletions

View File

@ -800,3 +800,13 @@ func TestProcessReceivesSIGCHLD(t *testing.T) {
}
})
}
func TestIssue239(t *testing.T) {
withTestProcess("is sue239", t, func(p *Process, fixture protest.Fixture) {
pos, _, err := p.goSymTable.LineToPC(fixture.Source, 17)
assertNoError(err, t, "LineToPC()")
_, err = p.SetBreakpoint(pos)
assertNoError(err, t, fmt.Sprintf("SetBreakpoint(%d)", pos))
assertNoError(p.Continue(), t, fmt.Sprintf("Continue()"))
})
}