]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmd.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdCmd.h
1 //===-- MICmdCmd.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:    CMICmdCmdEnablePrettyPrinting   interface.
10 //              CMICmdCmdSource                 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 /*
25 MI commands implemented are:
26         See MICmdCommands.cpp
27 */
28
29 #pragma once
30
31 // Third party headers:
32 #include "lldb/API/SBBreakpoint.h"
33 #include "lldb/API/SBCommandReturnObject.h"
34 #include <vector>
35
36 // In-house headers:
37 #include "MICmdBase.h"
38 #include "MICmnMIValueList.h"
39 #include "MICmnMIValueTuple.h"
40
41 //++
42 //============================================================================
43 // Details: MI command class. MI commands derived from the command base class.
44 //          *this class implements MI command "enable-pretty-printing".
45 //          Enables Python base pretty printing.
46 // Ref:
47 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
48 //--
49 class CMICmdCmdEnablePrettyPrinting : public CMICmdBase {
50   // Statics:
51 public:
52   // Required by the CMICmdFactory when registering *this command
53   static CMICmdBase *CreateSelf();
54
55   // Methods:
56 public:
57   /* ctor */ CMICmdCmdEnablePrettyPrinting();
58
59   // Overridden:
60 public:
61   // From CMICmdInvoker::ICmd
62   bool Execute() override;
63   bool Acknowledge() override;
64   // From CMICmnBase
65   /* dtor */ ~CMICmdCmdEnablePrettyPrinting() override;
66 };
67
68 //++
69 //============================================================================
70 // Details: MI command class. MI commands derived from the command base class.
71 //          *this class implements MI command "source".
72 //--
73 class CMICmdCmdSource : public CMICmdBase {
74   // Statics:
75 public:
76   // Required by the CMICmdFactory when registering *this command
77   static CMICmdBase *CreateSelf();
78
79   // Methods:
80 public:
81   /* ctor */ CMICmdCmdSource();
82
83   // Overridden:
84 public:
85   // From CMICmdInvoker::ICmd
86   bool Execute() override;
87   bool Acknowledge() override;
88   // From CMICmnBase
89   /* dtor */ ~CMICmdCmdSource() override;
90 };