diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2022-10-23 20:18:00 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2022-10-23 20:18:00 +0200 |
commit | 3e70d73d4499689840596598ea943296a34b53ab (patch) | |
tree | 458b32ae9d715e34612ae5a0b35900ee9b3c6ccc /src/Main.hs | |
parent | 10ca93f1eb318074f20f260565c180dd5f3ba96f (diff) |
Start GDB session on signal captured by the debugger
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 3 |
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 |