1 //===-- MICmnMIOutOfBandRecord.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // File: MICmnMIOutOfBandRecord.h
13 // Overview: CMICmnMIOutOfBandRecord interface.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
24 // Third party headers:
28 #include "MICmnBase.h"
29 #include "MIUtilString.h"
30 #include "MICmnMIValueResult.h"
32 //++ ============================================================================
33 // Details: MI common code MI Out-of-band (Async) Record class. A class that encapsulates
34 // MI result record data and the forming/format of data added to it.
35 // Out-of-band records are used to notify the GDB/MI client of additional
36 // changes that have occurred. Those changes can either be a consequence
37 // of GDB/MI (e.g., a breakpoint modified) or a result of target activity
38 // (e.g., target stopped).
39 // The syntax is as follows:
40 // "*" type ( "," result )*
41 // type ==> running | stopped
43 // The Out-of-band record can be retrieve at any time *this object is
44 // instantiated so unless work is done on *this Out-of-band record then it is
45 // possible to return a malformed Out-of-band record. If nothing has been set
46 // or added to *this MI Out-of-band record object then text "<Invalid>" will
49 // More information see:
50 // http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html//
52 // Authors: Illya Rudkin 24/02/2014.
55 class CMICmnMIOutOfBandRecord : public CMICmnBase
60 // Details: Enumeration of the type of Out-of-band for *this Out-of-band record
64 eOutOfBand_Running = 0,
66 eOutOfBand_BreakPointCreated,
67 eOutOfBand_BreakPointModified,
69 eOutOfBand_ThreadGroupAdded,
70 eOutOfBand_ThreadGroupExited,
71 eOutOfBand_ThreadGroupRemoved,
72 eOutOfBand_ThreadGroupStarted,
73 eOutOfBand_ThreadCreated,
74 eOutOfBand_ThreadExited,
75 eOutOfBand_ThreadSelected,
76 eOutOfBand_count // Always the last one
81 typedef std::map< OutOfBand_e, CMIUtilString > MapOutOfBandToOutOfBandText_t;
82 typedef std::map< OutOfBand_e, CMIUtilString > MapOutOfBandToToken_t;
86 /* ctor */ CMICmnMIOutOfBandRecord( void );
87 /* ctor */ CMICmnMIOutOfBandRecord( const OutOfBand_e veType );
88 /* ctor */ CMICmnMIOutOfBandRecord( const OutOfBand_e veType, const CMICmnMIValueResult & vValue );
90 const CMIUtilString & GetString( void ) const;
91 bool Add( const CMICmnMIValue & vMIValue );
96 /* dtor */ virtual ~CMICmnMIOutOfBandRecord( void );
100 bool BuildAsyncRecord( void );
104 static MapOutOfBandToOutOfBandText_t ms_constMapOutOfBandToAsyncRecordText;
105 static MapOutOfBandToToken_t ms_constMapOutOfBandTextToToken;
107 OutOfBand_e m_eResultAsyncRecordClass;
108 CMIUtilString m_strAsyncRecord; // Holds the text version of the result record to date
109 CMICmnMIValueResult m_partResult;