]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmdCmd.h
Vendor import of lldb trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmdCmd.h
1 //===-- MICmdCmd.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:    CMICmdCmdEnablePrettyPrinting   interface.
11 //              CMICmdCmdSource                 interface.
12 //
13 //              To implement new MI commands derive a new command class from the
14 //              command base
15 //              class. To enable the new command for interpretation add the new
16 //              command class
17 //              to the command factory. The files of relevance are:
18 //                  MICmdCommands.cpp
19 //                  MICmdBase.h / .cpp
20 //                  MICmdCmd.h / .cpp
21 //              For an introduction to adding a new command see
22 //              CMICmdCmdSupportInfoMiCmdQuery
23 //              command class as an example.
24
25 /*
26 MI commands implemented are:
27         See MICmdCommands.cpp
28 */
29
30 #pragma once
31
32 // Third party headers:
33 #include "lldb/API/SBBreakpoint.h"
34 #include "lldb/API/SBCommandReturnObject.h"
35 #include <vector>
36
37 // In-house headers:
38 #include "MICmdBase.h"
39 #include "MICmnMIValueList.h"
40 #include "MICmnMIValueTuple.h"
41
42 //++
43 //============================================================================
44 // Details: MI command class. MI commands derived from the command base class.
45 //          *this class implements MI command "enable-pretty-printing".
46 //          Enables Python base pretty printing.
47 // Ref:
48 // http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
49 //--
50 class CMICmdCmdEnablePrettyPrinting : public CMICmdBase {
51   // Statics:
52 public:
53   // Required by the CMICmdFactory when registering *this command
54   static CMICmdBase *CreateSelf();
55
56   // Methods:
57 public:
58   /* ctor */ CMICmdCmdEnablePrettyPrinting();
59
60   // Overridden:
61 public:
62   // From CMICmdInvoker::ICmd
63   bool Execute() override;
64   bool Acknowledge() override;
65   // From CMICmnBase
66   /* dtor */ ~CMICmdCmdEnablePrettyPrinting() override;
67 };
68
69 //++
70 //============================================================================
71 // Details: MI command class. MI commands derived from the command base class.
72 //          *this class implements MI command "source".
73 //--
74 class CMICmdCmdSource : public CMICmdBase {
75   // Statics:
76 public:
77   // Required by the CMICmdFactory when registering *this command
78   static CMICmdBase *CreateSelf();
79
80   // Methods:
81 public:
82   /* ctor */ CMICmdCmdSource();
83
84   // Overridden:
85 public:
86   // From CMICmdInvoker::ICmd
87   bool Execute() override;
88   bool Acknowledge() override;
89   // From CMICmnBase
90   /* dtor */ ~CMICmdCmdSource() override;
91 };