1// Package gdb provides a convenient way to interact with the GDB/MI
2// interface. The methods offered by this module are very low level, the main
3// goals are:
4//
5// - avoid the tedious parsing of the MI2 line-based text interface;
6//
7// - bypass a known bug(https://sourceware.org/bugzilla/show_bug.cgi?id=8759)
8//   which prevents to distinguish the target program's output from MI2 records.
9//
10// The objects returned as a result of the commands or as asynchronous
11// notifications are generic Go maps suitable to be converted to JSON format
12// with json.Unmarshal(). The fields present in such objects are blindly added
13// according to the records returned from GDB (see
14// https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Output-Syntax.html):
15// tuples are map[string]interface{} and lists are []interface{}. There are a
16// couple of exceptions to this:
17//
18// - the record class, where present, is represented by the "class" field;
19//
20// - the record type is represented using the "type" field as follows:
21//     "+": "status"
22//     "=": "notify"
23//     "~": "console"
24//     "@": "target"
25//     "&": "log"
26//
27// - the optional result list is stored into a tuple under the "payload" field.
28package gdb
29