]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdData.h
Merge ^/head r274961 through r275684.
[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 //++
11 // File:                MICmdData.h
12 //
13 // Overview:    SMICmdData interface.
14 //
15 // Environment: Compilers:      Visual C++ 12.
16 //                                                      gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //                              Libraries:      See MIReadmetxt. 
18 //
19 // Copyright:   None.
20 //--
21
22 #pragma once
23
24 // In-house headers:
25 #include "MICmnResources.h"
26
27 //++ ============================================================================
28 // Details:     MI command metadata. Holds the command's name, MI number and options
29 //                      as found on stdin. Holds the command's MI output (written to stdout).
30 // Gotchas:     None.
31 // Authors:     Illya Rudkin 18/02/2014.
32 // Changes:     None.
33 //--
34 struct SMICmdData
35 {
36         SMICmdData( void )
37         :       id( 0 )
38         ,       bCmdValid( false )
39         ,       bCmdExecutedSuccessfully( false )
40         ,       bMIOldStyle( false )
41         ,       bHasResultRecordExtra( false )
42         {
43         };
44
45         MIuint                  id;                                                             // A command's unique ID i.e. GUID
46         CMIUtilString   strMiCmdToken;                                  // The command's MI token (a number)    
47         CMIUtilString   strMiCmd;                                               // The command's name 
48         CMIUtilString   strMiCmdOption;                                 // The command's arguments or options
49         CMIUtilString   strMiCmdAll;                                    // The text as received from the client
50         CMIUtilString   strMiCmdResultRecord;                   // Each command forms 1 response to its input
51         CMIUtilString   strMiCmdResultRecordExtra;              // Hack command produce more response text to help the client because of using LLDB 
52         bool                    bCmdValid;                                              // True = Valid MI format command, false = invalid
53         bool                    bCmdExecutedSuccessfully;               // True = Command finished successfully, false = Did not start/did not complete
54         CMIUtilString   strErrorDescription;                    // Command failed this is why
55         bool                    bMIOldStyle;                                    // True = format "3thread", false = format "3-thread"
56         bool                    bHasResultRecordExtra;                  // True = Yes command produced additional MI output to its 1 line response, false = no extra MI output formed
57
58         void Clear( void )
59         {
60                 id = 0;
61                 strMiCmdToken.clear();          
62                 strMiCmd = MIRSRC( IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION );                 
63                 strMiCmdOption.clear(); 
64                 strMiCmdAll.clear();            
65                 strMiCmdResultRecord.clear();
66                 strMiCmdResultRecordExtra.clear();
67                 bCmdValid = false;
68                 bCmdExecutedSuccessfully = false;
69                 strErrorDescription.clear();
70                 bMIOldStyle = false;
71                 bHasResultRecordExtra = false;
72         }
73 };
74