| Safe Haskell | Safe-Inferred |
|---|
Gdbmi.Representation
Contents
Description
Data structures, parsers and printers for GDB/MI communication.
This is a low-level module not intended to be used by clients of this library.
Use Commands to create commands and receive responses as well as notifications via IO.
On-the-wire types reflect the GDB/MI grammar. Please consult the cited GDB documentation for details. The simplified types provide a simple abstraction over the on-the-wire types.
- data Command
- type Token = Int
- type Operation = String
- data Option = Option Parameter (Maybe Parameter)
- data Parameter
- data Output = Output [OutOfBandRecord] (Maybe ResultRecord)
- data ResultRecord = ResultRecord (Maybe Token) ResultClass [Result]
- data OutOfBandRecord
- data AsyncRecord
- data ExecAsyncOutput = ExecAsyncOutput (Maybe Token) AsyncOutput
- data StatusAsyncOutput = StatusAsyncOutput (Maybe Token) AsyncOutput
- data NotifyAsyncOutput = NotifyAsyncOutput (Maybe Token) AsyncOutput
- data AsyncOutput = AsyncOutput AsyncClass [Result]
- data ResultClass
- = RCDone
- | RCRunning
- | RCConnected
- | RCError
- | RCExit
- data AsyncClass
- data Result = Result {
- resVariable :: Variable
- resValue :: Value
- type Variable = String
- data Value
- type Const = CString
- data Tuple = Tuple {
- tupleResults :: [Result]
- data List
- = EmptyList
- | ValueList [Value]
- | ResultList [Result]
- data StreamRecord
- data ConsoleStreamOutput = ConsoleStreamOutput CString
- data TargetStreamOutput = TargetStreamOutput CString
- data LogStreamOutput = LogStreamOutput CString
- type CString = String
- data Response = Response {
- respClass :: ResultClass
- respResults :: [Result]
- data Notification = Notification {}
- data NotificationClass
- data Stream = Stream StreamClass String
- data StreamClass
- render_command :: Command -> String
- parse_output :: String -> Output
- output_response :: Output -> Maybe Response
- output_notification :: Output -> [Notification]
- output_stream :: Output -> [Stream]
- class GetToken a where
- asConst :: Value -> Maybe Const
- asTuple :: Value -> Maybe Tuple
- asList :: Value -> Maybe List
- parameter_valid :: Parameter -> Bool
On-the-Wire Types
Input
Output
Constructors
| Output [OutOfBandRecord] (Maybe ResultRecord) |
data OutOfBandRecord Source
Constructors
| OOBAsyncRecord AsyncRecord | |
| OOBStreamRecord StreamRecord |
Instances
data AsyncRecord Source
Constructors
| ARExecAsyncOutput ExecAsyncOutput | |
| ARStatusAsyncOutput StatusAsyncOutput | |
| ARNotifyAsyncOutput NotifyAsyncOutput |
Instances
data AsyncClass Source
Constructors
| ACStop | |
| ACThreadGroupAdded | |
| ACThreadGroupStarted | |
| ACThreadCreated | |
| ACRunning | |
| ACLibraryLoaded | |
| ACThreadExited | |
| ACThreadGroupExited | |
| ACBreakpointModified |
Instances
Constructors
| Result | |
Fields
| |
data StreamRecord Source
Constructors
| SRConsoleStreamOutput ConsoleStreamOutput | |
| SRTargetStreamOutput TargetStreamOutput | |
| SRLogStreamOutput LogStreamOutput |
Instances
Simplified
Constructors
| Response | The |
Fields
| |
data Notification Source
Constructors
| Notification | Simplification of the |
Fields | |
Instances
data NotificationClass Source
Instances
Constructors
| Stream StreamClass String | Simplifcation of the |
Functions
render_command :: Command -> StringSource
Generate the on-the-wire string suitable to be sent to GDB.
parse_output :: String -> OutputSource
Turn an GDB output string to an Output value.
output_response :: Output -> Maybe ResponseSource
Extract the response from an output, if existent.
output_notification :: Output -> [Notification]Source
Extract the (possible empty) list of notifications of an output.
output_stream :: Output -> [Stream]Source
Extract the (possibly) empty list of notifications of an output.
Return the token of the given object, if existent.
parameter_valid :: Parameter -> BoolSource
Verify that the given parameter is either a c-string or a "non-blank-sequence". See http://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI-Input-Syntax.html