]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmnMIValueConst.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmnMIValueConst.h
1 //===-- MICmnMIValueConst.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 CMICmnMIValueConstRecord
17 //          set of objects.
18 //          The syntax is as follows:
19 //          result-record ==>  [ token ] "^" result-class ( "," result )* nl
20 //          token = any sequence of digits
21 //          * = 0 to many
22 //          nl = CR | CR_LF
23 //          result-class ==> "done" | "running" | "connected" | "error" | "exit"
24 //          result ==> variable "=" value
25 //          value ==> const | tuple | list
26 //          const ==> c-string (7 bit iso c string content)
27 //          tuple ==>  "{}" | "{" result ( "," result )* "}"
28 //          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
29 //          result )* "]"
30 //          More information see:
31 //          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
32 //
33 //          The text formed in *this Result class is stripped of any '\n'
34 //          characters.
35 //--
36 class CMICmnMIValueConst : public CMICmnMIValue {
37   // Methods:
38 public:
39   /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString);
40   /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString,
41                                 const bool vbNoQuotes);
42
43   // Overridden:
44 public:
45   // From CMICmnBase
46   /* dtor */ ~CMICmnMIValueConst() override;
47
48   // Methods:
49 private:
50   bool BuildConst();
51
52   // Attributes:
53 private:
54   static const CMIUtilString ms_constStrDblQuote;
55   //
56   CMIUtilString m_strPartConst;
57   bool m_bNoQuotes; // True = return string not surrounded with quotes, false =
58                     // use quotes
59 };