1 //===-- MICmdCmdGdbThread.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: CMICmdCmdGdbThread implementation.
13 #include "MICmdCmdGdbThread.h"
14 #include "MICmnMIResultRecord.h"
15 #include "MICmnMIValueConst.h"
18 //------------------------------------------------------------------------------------
19 // Details: CMICmdCmdGdbThread constructor.
25 CMICmdCmdGdbThread::CMICmdCmdGdbThread() {
26 // Command factory matches this name with that received from the stdin stream
27 m_strMiCmd = "thread";
29 // Required by the CMICmdFactory when registering *this command
30 m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
34 //------------------------------------------------------------------------------------
35 // Details: CMICmdCmdThread destructor.
36 // Type: Overrideable.
41 CMICmdCmdGdbThread::~CMICmdCmdGdbThread() {}
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 CMICmdCmdGdbThread::Execute() {
58 return MIstatus::success;
62 //------------------------------------------------------------------------------------
63 // Details: The invoker requires this function. The command prepares a MI Record
65 // for the work carried out in the Execute().
68 // Return: MIstatus::success - Functional succeeded.
69 // MIstatus::failure - Functional failed.
72 bool CMICmdCmdGdbThread::Acknowledge() {
73 const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
74 const CMICmnMIValueResult miValueResult("msg", miValueConst);
75 const CMICmnMIResultRecord miRecordResult(
76 m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
78 m_miResultRecord = miRecordResult;
80 return MIstatus::success;
84 //------------------------------------------------------------------------------------
85 // Details: Required by the CMICmdFactory when registering *this command. The
87 // calls this function to create an instance of *this command.
88 // Type: Static method.
90 // Return: CMICmdBase * - Pointer to a new command.
93 CMICmdBase *CMICmdCmdGdbThread::CreateSelf() {
94 return new CMICmdCmdGdbThread();