hgdbmi-0.2: GDB Machine Interface: program-driven control of GDB

Safe HaskellSafe-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.

Synopsis

On-the-Wire Types

Input

Output

data Result Source

Constructors

Result 

Instances

data Value Source

Constructors

VConst Const 
VTuple Tuple 
VList List 

Instances

data Tuple Source

Constructors

Tuple 

Fields

tupleResults :: [Result]
 

Instances

data List Source

Instances

Simplified

data Response Source

Constructors

Response

The ResultRecord of an Output

Instances

data Notification Source

Constructors

Notification

Simplification of the AsyncRecord type hierarchie, a possible OutOfBandRecord value of an Output.

Instances

data Stream Source

Constructors

Stream StreamClass String

Simplifcation of the StreamRecord type hierarchie, a possible OutOfBandRecord value of an Output.

Instances

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.

asConst :: Value -> Maybe ConstSource

Coerce a value to a const.

asTuple :: Value -> Maybe TupleSource

Coerce a value to a tuple.

asList :: Value -> Maybe ListSource

Coerce a value to a list.

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