1 //===-- MICmdCmdMiscellanous.h ----------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Overview: CMICmdCmdGdbExit interface.
11 // CMICmdCmdListThreadGroups interface.
12 // CMICmdCmdInterpreterExec interface.
13 // CMICmdCmdInferiorTtySet interface.
15 // To implement new MI commands derive a new command class from the
17 // class. To enable the new command for interpretation add the new
19 // to the command factory. The files of relevance are:
23 // For an introduction to adding a new command see
24 // CMICmdCmdSupportInfoMiCmdQuery
25 // command class as an example.
29 // Third party headers:
30 #include "lldb/API/SBCommandReturnObject.h"
33 #include "MICmdBase.h"
34 #include "MICmnMIValueList.h"
35 #include "MICmnMIValueTuple.h"
38 //============================================================================
39 // Details: MI command class. MI commands derived from the command base class.
40 // *this class implements MI command "gdb-exit".
42 class CMICmdCmdGdbExit : public CMICmdBase {
45 // Required by the CMICmdFactory when registering *this command
46 static CMICmdBase *CreateSelf();
50 /* ctor */ CMICmdCmdGdbExit();
54 // From CMICmdInvoker::ICmd
55 bool Execute() override;
56 bool Acknowledge() override;
58 /* dtor */ ~CMICmdCmdGdbExit() override;
62 //============================================================================
63 // Details: MI command class. MI commands derived from the command base class.
64 // *this class implements MI command "list-thread-groups".
65 // This command does not follow the MI documentation exactly.
66 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands
68 class CMICmdCmdListThreadGroups : public CMICmdBase {
71 // Required by the CMICmdFactory when registering *this command
72 static CMICmdBase *CreateSelf();
76 /* ctor */ CMICmdCmdListThreadGroups();
80 // From CMICmdInvoker::ICmd
81 bool Execute() override;
82 bool Acknowledge() override;
83 bool ParseArgs() override;
85 /* dtor */ ~CMICmdCmdListThreadGroups() override;
89 typedef std::vector<CMICmnMIValueTuple> VecMIValueTuple_t;
93 bool m_bIsI1; // True = Yes command argument equal "i1", false = no match
94 bool m_bHaveArgOption; // True = Yes "--available" present, false = not found
95 bool m_bHaveArgRecurse; // True = Yes command argument "--recurse", false = no
97 VecMIValueTuple_t m_vecMIValueTuple;
98 const CMIUtilString m_constStrArgNamedAvailable;
99 const CMIUtilString m_constStrArgNamedRecurse;
100 const CMIUtilString m_constStrArgNamedGroup;
101 const CMIUtilString m_constStrArgNamedThreadGroup;
105 //============================================================================
106 // Details: MI command class. MI commands derived from the command base class.
107 // *this class implements MI command "interpreter-exec".
109 class CMICmdCmdInterpreterExec : public CMICmdBase {
112 // Required by the CMICmdFactory when registering *this command
113 static CMICmdBase *CreateSelf();
117 /* ctor */ CMICmdCmdInterpreterExec();
121 // From CMICmdInvoker::ICmd
122 bool Execute() override;
123 bool Acknowledge() override;
124 bool ParseArgs() override;
126 /* dtor */ ~CMICmdCmdInterpreterExec() override;
130 const CMIUtilString m_constStrArgNamedInterpreter;
131 const CMIUtilString m_constStrArgNamedCommand;
132 lldb::SBCommandReturnObject m_lldbResult;
136 //============================================================================
137 // Details: MI command class. MI commands derived from the command base class.
138 // *this class implements MI command "inferior-tty-set".
140 class CMICmdCmdInferiorTtySet : public CMICmdBase {
143 // Required by the CMICmdFactory when registering *this command
144 static CMICmdBase *CreateSelf();
148 /* ctor */ CMICmdCmdInferiorTtySet();
152 // From CMICmdInvoker::ICmd
153 bool Execute() override;
154 bool Acknowledge() override;
156 /* dtor */ ~CMICmdCmdInferiorTtySet() override;