From 1126c354e8527a94a3144a3381b81126e1a206e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 19 Oct 2022 08:17:07 +0200 Subject: GDB/MI output parsing --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 0330733..95aa83b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -232,10 +232,10 @@ spawnOn target pname killWith cmd = do _ -> outProc OutputChildStderr process line let net = either id nodeNetwork target - asks (teGDB . fst) >>= maybe (return Nothing) (liftIO . tryReadMVar) >>= liftIO . \case - Just gdb -> getPid handle >>= \case + asks (teGDB . fst) >>= maybe (return Nothing) (liftIO . tryReadMVar) >>= \case + Just gdb -> liftIO (getPid handle) >>= \case Just pid -> do - ps <- readMVar (netProcesses net) + ps <- liftIO $ readMVar (netProcesses net) addInferior gdb (length ps) pid Nothing -> return () Nothing -> return () -- cgit v1.2.3