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"
18 //------------------------------------------------------------------------------------
19 // Details: CMICmdCmdTraceStatus constructor.
25 CMICmdCmdTraceStatus::CMICmdCmdTraceStatus() {
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;
34 //------------------------------------------------------------------------------------
35 // Details: CMICmdCmdTraceStatus destructor.
36 // Type: Overrideable.
41 CMICmdCmdTraceStatus::~CMICmdCmdTraceStatus() {}
44 //------------------------------------------------------------------------------------
45 // Details: The invoker requires this function. The command does work in this
47 // The command is likely to communicate with the LLDB SBDebugger in
51 // Return: MIstatus::success - Functional succeeded.
52 // MIstatus::failure - Functional failed.
55 bool CMICmdCmdTraceStatus::Execute() {
57 return MIstatus::success;
61 //------------------------------------------------------------------------------------
62 // Details: The invoker requires this function. The command prepares a MI Record
64 // for the work carried out in the Execute().
67 // Return: MIstatus::success - Functional succeeded.
68 // MIstatus::failure - Functional failed.
71 bool CMICmdCmdTraceStatus::Acknowledge() {
72 const CMICmnMIValueConst miValueConst(MIRSRC(IDS_CMD_ERR_NOT_IMPLEMENTED));
73 const CMICmnMIValueResult miValueResult("msg", miValueConst);
74 const CMICmnMIResultRecord miRecordResult(
75 m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
77 m_miResultRecord = miRecordResult;
79 return MIstatus::success;
83 //------------------------------------------------------------------------------------
84 // Details: Required by the CMICmdFactory when registering *this command. The
86 // calls this function to create an instance of *this command.
87 // Type: Static method.
89 // Return: CMICmdBase * - Pointer to a new command.
92 CMICmdBase *CMICmdCmdTraceStatus::CreateSelf() {
93 return new CMICmdCmdTraceStatus();