]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h
Merge clang release_80 branch r351543, and resolve conflicts.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIOutOfBandRecord.h
1 //===-- MICmnMIOutOfBandRecord.h --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #pragma once
11
12 // In-house headers:
13 #include "MICmnBase.h"
14 #include "MICmnMIValueConst.h"
15 #include "MICmnMIValueResult.h"
16 #include "MIUtilString.h"
17
18 //++
19 //============================================================================
20 // Details: MI common code MI Out-of-band (Async) Record class. A class that
21 // encapsulates
22 //          MI result record data and the forming/format of data added to it.
23 //          Out-of-band records are used to notify the GDB/MI client of
24 //          additional
25 //          changes that have occurred. Those changes can either be a
26 //          consequence
27 //          of GDB/MI (e.g., a breakpoint modified) or a result of target
28 //          activity
29 //          (e.g., target stopped).
30 //          The syntax is as follows:
31 //          "*" type ( "," result )*
32 //          type ==> running | stopped
33 //
34 //          The Out-of-band record can be retrieve at any time *this object is
35 //          instantiated so unless work is done on *this Out-of-band record then
36 //          it is
37 //          possible to return a malformed Out-of-band record. If nothing has
38 //          been set
39 //          or added to *this MI Out-of-band record object then text "<Invalid>"
40 //          will
41 //          be returned.
42 //
43 //          More information see:
44 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html//
45 //--
46 class CMICmnMIOutOfBandRecord : public CMICmnBase {
47   // Enumerations:
48 public:
49   //++
50   // Details: Enumeration of the type of Out-of-band for *this Out-of-band
51   // record
52   //--
53   enum OutOfBand_e {
54     eOutOfBand_Running = 0,
55     eOutOfBand_Stopped,
56     eOutOfBand_BreakPointCreated,
57     eOutOfBand_BreakPointModified,
58     eOutOfBand_Thread,
59     eOutOfBand_ThreadGroupAdded,
60     eOutOfBand_ThreadGroupExited,
61     eOutOfBand_ThreadGroupRemoved,
62     eOutOfBand_ThreadGroupStarted,
63     eOutOfBand_ThreadCreated,
64     eOutOfBand_ThreadExited,
65     eOutOfBand_ThreadSelected,
66     eOutOfBand_TargetModuleLoaded,
67     eOutOfBand_TargetModuleUnloaded,
68     eOutOfBand_TargetStreamOutput,
69     eOutOfBand_ConsoleStreamOutput,
70     eOutOfBand_LogStreamOutput
71   };
72
73   // Methods:
74 public:
75   /* ctor */ CMICmnMIOutOfBandRecord();
76   /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType);
77   /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType,
78                                      const CMICmnMIValueConst &vConst);
79   /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType,
80                                      const CMICmnMIValueResult &vResult);
81   //
82   const CMIUtilString &GetString() const;
83   void Add(const CMICmnMIValueResult &vResult);
84
85   // Overridden:
86 public:
87   // From CMICmnBase
88   /* dtor */ ~CMICmnMIOutOfBandRecord() override;
89
90   // Attributes:
91 private:
92   CMIUtilString
93       m_strAsyncRecord; // Holds the text version of the result record to date
94 };