1 //===-- MICmdCmdThread.h ----------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Overview: CMICmdCmdThreadInfo interface.
11 // To implement new MI commands derive a new command class from the
13 // class. To enable the new command for interpretation add the new
15 // to the command factory. The files of relevance are:
19 // For an introduction to adding a new command see
20 // CMICmdCmdSupportInfoMiCmdQuery
21 // command class as an example.
26 #include "MICmdBase.h"
27 #include "MICmnMIValueList.h"
28 #include "MICmnMIValueTuple.h"
31 //============================================================================
32 // Details: MI command class. MI commands derived from the command base class.
33 // *this class implements MI command "thread-info".
35 class CMICmdCmdThreadInfo : public CMICmdBase {
38 // Required by the CMICmdFactory when registering *this command
39 static CMICmdBase *CreateSelf();
43 /* ctor */ CMICmdCmdThreadInfo();
47 // From CMICmdInvoker::ICmd
48 bool Execute() override;
49 bool Acknowledge() override;
50 bool ParseArgs() override;
52 /* dtor */ ~CMICmdCmdThreadInfo() override;
56 typedef std::vector<CMICmnMIValueTuple> VecMIValueTuple_t;
60 CMICmnMIValueTuple m_miValueTupleThread;
61 bool m_bSingleThread; // True = yes single thread, false = multiple threads
62 bool m_bThreadInvalid; // True = invalid, false = ok
63 VecMIValueTuple_t m_vecMIValueTuple;
64 const CMIUtilString m_constStrArgNamedThreadId;
66 // mi value of current-thread-id if multiple threads are requested
67 bool m_bHasCurrentThread;
68 CMICmnMIValue m_miValueCurrThreadId;