1 //===-- MICmdCmdTrace.cpp ---------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Overview: CMICmdCmdTraceStatus implementation.
13 #include "MICmdCmdTrace.h"
14 #include "MICmnMIResultRecord.h"
15 #include "MICmnMIValueConst.h"
17 //++ ------------------------------------------------------------------------------------
18 // Details: CMICmdCmdTraceStatus constructor.
24 CMICmdCmdTraceStatus::CMICmdCmdTraceStatus(void)
26 // Command factory matches this name with that received from the stdin stream
27 m_strMiCmd = "trace-status";
29 // Required by the CMICmdFactory when registering *this command
30 m_pSelfCreatorFn = &CMICmdCmdTraceStatus::CreateSelf;
33 //++ ------------------------------------------------------------------------------------
34 // Details: CMICmdCmdTraceStatus destructor.
35 // Type: Overrideable.
40 CMICmdCmdTraceStatus::~CMICmdCmdTraceStatus(void)
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.
49 // Return: MIstatus::success - Functional succeeded.
50 // MIstatus::failure - Functional failed.
54 CMICmdCmdTraceStatus::Execute(void)
57 return MIstatus::success;
60 //++ ------------------------------------------------------------------------------------
61 // Details: The invoker requires this function. The command prepares a MI Record Result
62 // for the work carried out in the Execute().
65 // Return: MIstatus::success - Functional succeeded.
66 // MIstatus::failure - Functional failed.
70 CMICmdCmdTraceStatus::Acknowledge(void)
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;
77 return MIstatus::success;
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.
85 // Return: CMICmdBase * - Pointer to a new command.
89 CMICmdCmdTraceStatus::CreateSelf(void)
91 return new CMICmdCmdTraceStatus();