From c4eadc386bb40f5370192595338b45cc4d9f82ba Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Sun, 23 Nov 2014 10:44:28 -0600 Subject: [PATCH] Cleanup stopTheWorld arity --- proctl/proctl_linux_amd64.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/proctl/proctl_linux_amd64.go b/proctl/proctl_linux_amd64.go index 3a0e3430..ae207d7d 100644 --- a/proctl/proctl_linux_amd64.go +++ b/proctl/proctl_linux_amd64.go @@ -441,14 +441,14 @@ func handleBreakPoint(dbp *DebuggedProcess, pid int) error { return err } } - stopTheWorld(dbp, thread, pid) + stopTheWorld(dbp) return nil } // Check to see if we have hit a user set breakpoint. if bp, ok := dbp.BreakPoints[pc-1]; ok { if !bp.temp { - stopTheWorld(dbp, thread, pid) + stopTheWorld(dbp) } return nil } @@ -456,18 +456,13 @@ func handleBreakPoint(dbp *DebuggedProcess, pid int) error { return fmt.Errorf("did not hit recognized breakpoint") } -func stopTheWorld(dbp *DebuggedProcess, thread *ThreadContext, pid int) error { +func stopTheWorld(dbp *DebuggedProcess) error { // Loop through all threads and ensure that we // stop the rest of them, so that by the time // we return control to the user, all threads // are inactive. We send SIGSTOP and ensure all // threads are in in signal-delivery-stop mode. for _, th := range dbp.Threads { - if th.Id == pid { - // This thread is already stopped. - continue - } - ps, err := parseProcessStatus(th.Id) if err != nil { return err