summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-10-21 21:52:46 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-10-21 22:03:27 +0200
commit10ca93f1eb318074f20f260565c180dd5f3ba96f (patch)
tree5b4fcfdf11bf7e4e88a21a4f9ec7b8402404d3ad /src/Main.hs
parent1126c354e8527a94a3144a3381b81126e1a206e2 (diff)
Handle GDB thread groups properly
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs6
1 files changed, 1 insertions, 5 deletions
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:)