diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-10-19 08:17:07 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-10-21 22:03:27 +0200 |
commit | 1126c354e8527a94a3144a3381b81126e1a206e2 (patch) | |
tree | 7778db95cd93149ca700f4dec2bf8d32785df5b5 /src/Main.hs | |
parent | 958c0a17842612f667cba89fe6712a2197985aad (diff) |
GDB/MI output parsing
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 () |