]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/tools/lldb-mi/MICmdData.h
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / tools / lldb-mi / MICmdData.h
1 //===-- MICmdData.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 "MICmnResources.h"
13
14 //++
15 //============================================================================
16 // Details: MI command metadata. Holds the command's name, MI number and options
17 //          as found on stdin. Holds the command's MI output (written to
18 //          stdout).
19 //--
20 struct SMICmdData {
21   SMICmdData()
22       : id(0), bCmdValid(false), bCmdExecutedSuccessfully(false),
23         bMIOldStyle(false), bHasResultRecordExtra(false) {}
24
25   MIuint id;                    // A command's unique ID i.e. GUID
26   CMIUtilString strMiCmdToken;  // The command's MI token (a number)
27   CMIUtilString strMiCmd;       // The command's name
28   CMIUtilString strMiCmdOption; // The command's arguments or options
29   CMIUtilString strMiCmdAll;    // The text as received from the client
30   CMIUtilString
31       strMiCmdResultRecord; // Each command forms 1 response to its input
32   CMIUtilString strMiCmdResultRecordExtra; // Hack command produce more response
33                                            // text to help the client because of
34                                            // using LLDB
35   bool bCmdValid; // True = Valid MI format command, false = invalid
36   bool bCmdExecutedSuccessfully; // True = Command finished successfully, false
37                                  // = Did not start/did not complete
38   CMIUtilString strErrorDescription; // Command failed this is why
39   bool bMIOldStyle; // True = format "3thread", false = format "3-thread"
40   bool bHasResultRecordExtra; // True = Yes command produced additional MI
41                               // output to its 1 line response, false = no extra
42                               // MI output formed
43
44   void Clear() {
45     id = 0;
46     strMiCmdToken.clear();
47     strMiCmd = MIRSRC(IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION);
48     strMiCmdOption.clear();
49     strMiCmdAll.clear();
50     strMiCmdResultRecord.clear();
51     strMiCmdResultRecordExtra.clear();
52     bCmdValid = false;
53     bCmdExecutedSuccessfully = false;
54     strErrorDescription.clear();
55     bMIOldStyle = false;
56     bHasResultRecordExtra = false;
57   }
58 };