Safe Haskell | Safe-Inferred |
---|
Control execution of a GDB instance, send commands and receive results, notifications and stream information.
Due to http://sourceware.org/bugzilla/show_bug.cgi?id=8759 the first command issued should be to set the output terminal for GDB to /dev/null. Unfortunatelly, there is no MI command for this, so we have to resort to the CLI command "tty". For example:
>>>
ctx <- setup config callback
>>>
resp <- send_command ctx (cli_command "tty /dev/null")
>>>
when (respClass resp /= RCDone) (error ("unexpected response: " ++ show resp))
Documentation
Configuration
Config | |
|
Call-back functions for asynchronous GDB output.
The call-backs are called in a separate thread per GDB output, so they may block.
Stop events are Notification
events with NotificationClass
Exec
and AsyncClass
ACStop
.
If cbStopped
is given stop events are delivered to that call-back instead of cbNotify
.
default_config :: ConfigSource
Default configuration: gdb command line, no log file
setup :: Config -> Callback -> IO ContextSource
Launch a GDB instance in Machine Interface mode.
The child process is run in a new session to avoid receiving SIGINTs when issuing -exec-interrupt.