Skip to content

Commit

Permalink
Merge pull request #726 from bittide/rs/gdb-timeout
Browse files Browse the repository at this point in the history
Add wrapper function around the `set timeout` GDB command.
  • Loading branch information
rslawson authored Feb 26, 2025
2 parents a883e38 + 9d55f51 commit df8c8bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bittide-instances/src/Bittide/Instances/Hitl/Utils/Gdb.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ setFile :: ProcessStdIoHandles -> FilePath -> IO ()
setFile gdb filePath = do
runCommands gdb.stdinHandle ["file " <> filePath]

setTimeout :: ProcessStdIoHandles -> Maybe Int -> IO ()
setTimeout gdb Nothing = do
runCommands gdb.stdinHandle ["set remotetimeout unlimited"]
setTimeout gdb (Just (show -> time)) = do
runCommands gdb.stdinHandle ["set remotetimeout " <> time]

-- | Sets breakpoints on functions in gdb.
setBreakpoints :: ProcessStdIoHandles -> [String] -> IO ()
setBreakpoints gdb breakpoints = do
Expand Down

0 comments on commit df8c8bd

Please sign in to comment.