Remove unused 'singleStepping' state on Process
We don't care, at the process level, whether or not we're single stepping. That state is really only relevant at the thread level.
This commit is contained in:
parent
8aa73bcf21
commit
ed9b7769fd
@ -40,7 +40,6 @@ type Process struct {
|
||||
frameEntries frame.FrameDescriptionEntries
|
||||
lineInfo *line.DebugLineInfo
|
||||
firstStart bool
|
||||
singleStepping bool
|
||||
os *OSProcessDetails
|
||||
arch Arch
|
||||
ast *source.Searcher
|
||||
@ -386,8 +385,6 @@ func (dbp *Process) Continue() error {
|
||||
// Single step, will execute a single instruction.
|
||||
func (dbp *Process) Step() (err error) {
|
||||
fn := func() error {
|
||||
dbp.singleStepping = true
|
||||
defer func() { dbp.singleStepping = false }()
|
||||
for _, th := range dbp.Threads {
|
||||
if th.blocked() {
|
||||
continue
|
||||
|
@ -282,6 +282,7 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
|
||||
}
|
||||
dbp.exited = true
|
||||
return nil, ProcessExitedError{Pid: dbp.Pid, Status: status.ExitStatus()}
|
||||
|
||||
case C.MACH_RCV_INTERRUPTED:
|
||||
if !dbp.halt {
|
||||
// Call trapWait again, it seems
|
||||
@ -290,6 +291,7 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
|
||||
continue
|
||||
}
|
||||
return nil, nil
|
||||
|
||||
case 0:
|
||||
return nil, fmt.Errorf("error while waiting for task")
|
||||
}
|
||||
@ -305,7 +307,7 @@ func (dbp *Process) trapWait(pid int) (*Thread, error) {
|
||||
return dbp.Threads[int(port)], nil
|
||||
}
|
||||
th := dbp.Threads[int(port)]
|
||||
if dbp.firstStart || dbp.singleStepping || th.singleStepping {
|
||||
if dbp.firstStart || th.singleStepping {
|
||||
dbp.firstStart = false
|
||||
return dbp.Threads[int(port)], nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user