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