GDB/MI lets programs drive GDB. It can be used, for example, by GDB frontends. This module wraps attaching GDB to a process and parsing the (surprisingly complicated) GDB/MI output.
- data GDB
- attach :: Maybe FilePath -> ProcessID -> IO (Either String (GDB, MIOutput))
- detach :: GDB -> IO ()
- runCommand :: GDBCommand -> GDB -> IO (Either String MIOutput)
- data GDBCommand
- data MIOutput = MIOutput [MIOOB] (Maybe MIResult)
- data MIOOB
- data MIResult
- type MIKeyVal = (String, MIValue)
- data MIValue
- parse :: SourceName -> [Char] -> Either ParseError MIOutput
|:: Maybe FilePath|
Working directory for GDB. (Important if the process has loaded libraries from relative paths.)
|-> IO (Either String (GDB, MIOutput))|
Attach to a process, returning an error or the
GDB connection and its
A GDB command. CLICommand is any command you'd normally type at the GDB prompt. MICommand are more machine-parsing friendly commands; see the GDB/MI docs for details.
The output of running a GDB command. Output is a collection of Out-Of-Band messages (such as logging information) and an optional final result.
The type of OOB mesages. (TODO: many of these aren't properly parsed yet.)
Contains on-going status information about the progress of a slow operation.
Contains asynchronous state change on the target (stopped, started, disappeared).
Contains supplementary information that the client should handle (e.g., a new breakpoint information).
Output that should be displayed as is in the console. It is the textual response to a CLI command.
The output produced by the target program.
Output text coming from GDB's internals, for instance messages that should be displayed as part of an error log.
The type of the GDB result. (TODO: many result types aren't implemented yet.)
The synchronous operation was successful, along with potential key-value return data.
The operation failed. The string contains the corresponding error message.
The type of a GDB value, used in the output of structured data.