From 10ca93f1eb318074f20f260565c180dd5f3ba96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 21 Oct 2022 21:52:46 +0200 Subject: Handle GDB thread groups properly --- src/Main.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 95aa83b..f44ce83 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -233,11 +233,7 @@ spawnOn target pname killWith cmd = do let net = either id nodeNetwork target asks (teGDB . fst) >>= maybe (return Nothing) (liftIO . tryReadMVar) >>= \case - Just gdb -> liftIO (getPid handle) >>= \case - Just pid -> do - ps <- liftIO $ readMVar (netProcesses net) - addInferior gdb (length ps) pid - Nothing -> return () + Just gdb -> addInferior gdb process Nothing -> return () liftIO $ modifyMVar_ (netProcesses net) $ return . (process:) -- cgit v1.2.3