summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-10-23 20:18:00 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-10-23 20:18:00 +0200
commit3e70d73d4499689840596598ea943296a34b53ab (patch)
tree458b32ae9d715e34612ae5a0b35900ee9b3c6ccc /src/Main.hs
parent10ca93f1eb318074f20f260565c180dd5f3ba96f (diff)
Start GDB session on signal captured by the debugger
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index f44ce83..9d2f9cc 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -150,7 +150,8 @@ initNetwork inner = do
useGDB <- asks $ optGDB . teOptions . fst
mgdb <- if useGDB
then do
- gdb <- gdbStart
+ failedVar <- asks $ teFailed . fst
+ gdb <- gdbStart $ atomically . writeTVar failedVar . Just . ProcessCrashed
liftIO $ modifyMVar_ (netProcesses net) $ return . (gdbProcess gdb:)
Just <$> liftIO (newMVar gdb)
else return Nothing