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