summaryrefslogtreecommitdiff
path: root/src/GDB.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-04-16 21:44:20 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-04-18 22:25:18 +0200
commitbaa086bd025ce49a75d8cc9d64d24615ab960357 (patch)
treef1ce6d3a889a91a3efaa43c08e26171267f6dc38 /src/GDB.hs
parentf0eed671c65a31eeb34ece14547bea79eb753728 (diff)
Shell interpreter for test script
Changelog: Experimental shell interpreter
Diffstat (limited to 'src/GDB.hs')
-rw-r--r--src/GDB.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GDB.hs b/src/GDB.hs
index 2862065..0819600 100644
--- a/src/GDB.hs
+++ b/src/GDB.hs
@@ -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