]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.h
Fix a memory leak in if_delgroups() introduced in r334118.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdCmdThread.h
1 //===-- MICmdCmdThread.h ----------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 // Overview:    CMICmdCmdThreadInfo interface.
10 //
11 //              To implement new MI commands derive a new command class from the
12 //              command base
13 //              class. To enable the new command for interpretation add the new
14 //              command class
15 //              to the command factory. The files of relevance are:
16 //                  MICmdCommands.cpp
17 //                  MICmdBase.h / .cpp
18 //                  MICmdCmd.h / .cpp
19 //              For an introduction to adding a new command see
20 //              CMICmdCmdSupportInfoMiCmdQuery
21 //              command class as an example.
22
23 #pragma once
24
25 // In-house headers:
26 #include "MICmdBase.h"
27 #include "MICmnMIValueList.h"
28 #include "MICmnMIValueTuple.h"
29
30 //++
31 //============================================================================
32 // Details: MI command class. MI commands derived from the command base class.
33 //          *this class implements MI command "thread-info".
34 //--
35 class CMICmdCmdThreadInfo : public CMICmdBase {
36   // Statics:
37 public:
38   // Required by the CMICmdFactory when registering *this command
39   static CMICmdBase *CreateSelf();
40
41   // Methods:
42 public:
43   /* ctor */ CMICmdCmdThreadInfo();
44
45   // Overridden:
46 public:
47   // From CMICmdInvoker::ICmd
48   bool Execute() override;
49   bool Acknowledge() override;
50   bool ParseArgs() override;
51   // From CMICmnBase
52   /* dtor */ ~CMICmdCmdThreadInfo() override;
53
54   // Typedefs:
55 private:
56   typedef std::vector<CMICmnMIValueTuple> VecMIValueTuple_t;
57
58   // Attributes:
59 private:
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;
65
66   // mi value of current-thread-id if multiple threads are requested
67   bool m_bHasCurrentThread;
68   CMICmnMIValue m_miValueCurrThreadId;
69 };