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