mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
proc: bugfix: status does not work with programs containing spaces
/proc/pid/stat needs more complex parsing Fixes #239
This commit is contained in:
@ -18,7 +18,7 @@ func (t *Thread) halt() (err error) {
|
||||
err = fmt.Errorf("halt err %s on thread %d", err, t.Id)
|
||||
return
|
||||
}
|
||||
_, _, err = wait(t.Id, t.dbp.Pid, 0)
|
||||
_, _, err = t.dbp.wait(t.Id, 0)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("wait err %s on thread %d", err, t.Id)
|
||||
return
|
||||
@ -27,7 +27,7 @@ func (t *Thread) halt() (err error) {
|
||||
}
|
||||
|
||||
func (thread *Thread) stopped() bool {
|
||||
state := status(thread.Id)
|
||||
state := status(thread.Id, thread.dbp.comm)
|
||||
return state == STATUS_TRACE_STOP
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ func (t *Thread) singleStep() (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, _, err = wait(t.Id, t.dbp.Pid, 0)
|
||||
_, _, err = t.dbp.wait(t.Id, 0)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user