diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-16 21:44:20 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-04-18 22:25:18 +0200 |
commit | baa086bd025ce49a75d8cc9d64d24615ab960357 (patch) | |
tree | f1ce6d3a889a91a3efaa43c08e26171267f6dc38 /src/GDB.hs | |
parent | f0eed671c65a31eeb34ece14547bea79eb753728 (diff) |
Shell interpreter for test script
Changelog: Experimental shell interpreter
Diffstat (limited to 'src/GDB.hs')
-rw-r--r-- | src/GDB.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -75,7 +75,7 @@ gdbStart onCrash = do let process = Process { procName = ProcNameGDB - , procHandle = handle + , procHandle = Left handle , procStdin = hin , procOutput = pout , procKillWith = Nothing @@ -144,7 +144,7 @@ gdbLine gdb rline = either (outProc OutputError (gdbProcess gdb) . T.pack . erro addInferior :: MonadOutput m => GDB -> Process -> m () addInferior gdb process = do - liftIO (getPid $ procHandle process) >>= \case + liftIO (either getPid (\_ -> return Nothing) $ procHandle process) >>= \case Nothing -> outProc OutputError process $ "failed to get PID" Just pid -> do tgid <- liftIO (atomically $ tryReadTChan $ gdbThreadGroups gdb) >>= \case |