]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueResult.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIValueResult.h
1 //===-- MICmnMIValueResult.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 #pragma once
10
11 // In-house headers:
12 #include "MICmnMIValue.h"
13
14 //++
15 //============================================================================
16 // Details: MI common code MI Result class. Part of the
17 // CMICmnMIValueResultRecord
18 //          set of objects.
19 //          The syntax is as follows:
20 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
21 //          token = any sequence of digits
22 //          * = 0 to many
23 //          nl = CR | CR_LF
24 //          result-class ==> "done" | "running" | "connected" | "error" | "exit"
25 //          result ==> variable "=" value
26 //          value ==> const | tuple | list
27 //          const ==> c-string (7 bit iso c string content)
28 //          tuple ==>  "{}" | "{" result ( "," result )* "}"
29 //          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
30 //          result )* "]"
31 //          More information see:
32 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
33 //--
34 class CMICmnMIValueResult : public CMICmnMIValue {
35   // Methods:
36 public:
37   /* ctor */ CMICmnMIValueResult();
38   /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
39                                  const CMICmnMIValue &vValue);
40   /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
41                                  const CMICmnMIValue &vValue,
42                                  const bool vbUseSpacing);
43   //
44   void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
45
46   // Overridden:
47 public:
48   // From CMICmnBase
49   /* dtor */ ~CMICmnMIValueResult() override;
50
51   // Methods:
52 private:
53   void BuildResult();
54   void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
55
56   // Attributes:
57 private:
58   static const CMIUtilString ms_constStrEqual;
59   //
60   CMIUtilString m_strPartVariable;
61   CMICmnMIValue m_partMIValue;
62   bool m_bEmptyConstruction; // True = *this object used constructor with no
63                              // parameters, false = constructor with parameters
64   bool m_bUseSpacing; // True = put space separators into the string, false = no
65                       // spaces used
66 };