]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdTrace.cpp
Merge OpenSSL 1.0.2e.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdCmdTrace.cpp
1 //===-- MICmdCmdTrace.cpp ---------------------------------------*- 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:    CMICmdCmdTraceStatus    implementation.
11
12 // In-house headers:
13 #include "MICmdCmdTrace.h"
14 #include "MICmnMIResultRecord.h"
15 #include "MICmnMIValueConst.h"
16
17 //++ ------------------------------------------------------------------------------------
18 // Details: CMICmdCmdTraceStatus constructor.
19 // Type:    Method.
20 // Args:    None.
21 // Return:  None.
22 // Throws:  None.
23 //--
24 CMICmdCmdTraceStatus::CMICmdCmdTraceStatus(void)
25 {
26     // Command factory matches this name with that received from the stdin stream
27     m_strMiCmd = "trace-status";
28
29     // Required by the CMICmdFactory when registering *this command
30     m_pSelfCreatorFn = &CMICmdCmdTraceStatus::CreateSelf;
31 }
32
33 //++ ------------------------------------------------------------------------------------
34 // Details: CMICmdCmdTraceStatus destructor.
35 // Type:    Overrideable.
36 // Args:    None.
37 // Return:  None.
38 // Throws:  None.
39 //--
40 CMICmdCmdTraceStatus::~CMICmdCmdTraceStatus(void)
41 {
42 }
43
44 //++ ------------------------------------------------------------------------------------
45 // Details: The invoker requires this function. The command does work in this function.
46 //          The command is likely to communicate with the LLDB SBDebugger in here.
47 // Type:    Overridden.
48 // Args:    None.
49 // Return:  MIstatus::success - Functional succeeded.
50 //          MIstatus::failure - Functional failed.
51 // Throws:  None.
52 //--
53 bool
54 CMICmdCmdTraceStatus::Execute(void)
55 {
56     // Do nothing
57     return MIstatus::success;
58 }
59
60 //++ ------------------------------------------------------------------------------------
61 // Details: The invoker requires this function. The command prepares a MI Record Result
62 //          for the work carried out in the Execute().
63 // Type:    Overridden.
64 // Args:    None.
65 // Return:  MIstatus::success - Functional succeeded.
66 //          MIstatus::failure - Functional failed.
67 // Throws:  None.
68 //--
69 bool
70 CMICmdCmdTraceStatus::Acknowledge(void)
71 {
72     const CMICmnMIValueConst miValueConst(MIRSRC(IDS_CMD_ERR_NOT_IMPLEMENTED));
73     const CMICmnMIValueResult miValueResult("msg", miValueConst);
74     const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult);
75     m_miResultRecord = miRecordResult;
76
77     return MIstatus::success;
78 }
79
80 //++ ------------------------------------------------------------------------------------
81 // Details: Required by the CMICmdFactory when registering *this command. The factory
82 //          calls this function to create an instance of *this command.
83 // Type:    Static method.
84 // Args:    None.
85 // Return:  CMICmdBase * - Pointer to a new command.
86 // Throws:  None.
87 //--
88 CMICmdBase *
89 CMICmdCmdTraceStatus::CreateSelf(void)
90 {
91     return new CMICmdCmdTraceStatus();
92 }