1 //===-- MICmdCmdTarget.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 // Overview: CMICmdCmdTargetSelect interface. 11 // 12 // To implement new MI commands derive a new command class from the 13 // command base 14 // class. To enable the new command for interpretation add the new 15 // command class 16 // to the command factory. The files of relevance are: 17 // MICmdCommands.cpp 18 // MICmdBase.h / .cpp 19 // MICmdCmd.h / .cpp 20 // For an introduction to adding a new command see 21 // CMICmdCmdSupportInfoMiCmdQuery 22 // command class as an example. 23 24 #pragma once 25 26 // In-house headers: 27 #include "MICmdBase.h" 28 #include "MICmnMIValueList.h" 29 #include "MICmnMIValueTuple.h" 30 31 //++ 32 //============================================================================ 33 // Details: MI command class. MI commands derived from the command base class. 34 // *this class implements MI command "target-select". 35 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation 36 //-- 37 class CMICmdCmdTargetSelect : public CMICmdBase { 38 // Statics: 39 public: 40 // Required by the CMICmdFactory when registering *this command 41 static CMICmdBase *CreateSelf(); 42 43 // Methods: 44 public: 45 /* ctor */ CMICmdCmdTargetSelect(); 46 47 // Overridden: 48 public: 49 // From CMICmdInvoker::ICmd 50 bool Execute() override; 51 bool Acknowledge() override; 52 bool ParseArgs() override; 53 // From CMICmnBase 54 /* dtor */ ~CMICmdCmdTargetSelect() override; 55 56 // Attributes: 57 private: 58 const CMIUtilString m_constStrArgNamedType; 59 const CMIUtilString m_constStrArgNamedParameters; 60 }; 61 62 //++ 63 //============================================================================ 64 // Details: MI command class. MI commands derived from the command base class. 65 // *this class implements MI command "target-attach". 66 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation 67 //-- 68 class CMICmdCmdTargetAttach : public CMICmdBase { 69 // Statics: 70 public: 71 // Required by the CMICmdFactory when registering *this command 72 static CMICmdBase *CreateSelf(); 73 74 // Methods: 75 public: 76 /* ctor */ CMICmdCmdTargetAttach(); 77 78 // Overridden: 79 public: 80 // From CMICmdInvoker::ICmd 81 bool Execute() override; 82 bool Acknowledge() override; 83 bool ParseArgs() override; 84 // From CMICmnBase 85 /* dtor */ ~CMICmdCmdTargetAttach() override; 86 87 // Attributes: 88 private: 89 const CMIUtilString m_constStrArgPid; 90 const CMIUtilString m_constStrArgNamedFile; 91 const CMIUtilString m_constStrArgWaitFor; 92 }; 93 94 //++ 95 //============================================================================ 96 // Details: MI command class. MI commands derived from the command base class. 97 // *this class implements MI command "target-attach". 98 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation 99 //-- 100 class CMICmdCmdTargetDetach : public CMICmdBase { 101 // Statics: 102 public: 103 // Required by the CMICmdFactory when registering *this command 104 static CMICmdBase *CreateSelf(); 105 106 // Methods: 107 public: 108 /* ctor */ CMICmdCmdTargetDetach(); 109 110 // Overridden: 111 public: 112 // From CMICmdInvoker::ICmd 113 bool Execute() override; 114 bool Acknowledge() override; 115 bool ParseArgs() override; 116 // From CMICmnBase 117 /* dtor */ ~CMICmdCmdTargetDetach() override; 118 }; 119