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"
17 //++ ------------------------------------------------------------------------------------
18 // Details: CMICmdCmdGdbThread constructor.
24 CMICmdCmdGdbThread::CMICmdCmdGdbThread(void)
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;
33 //++ ------------------------------------------------------------------------------------
34 // Details: CMICmdCmdThread destructor.
35 // Type: Overrideable.
40 CMICmdCmdGdbThread::~CMICmdCmdGdbThread(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 CMICmdCmdGdbThread::Execute(void)
58 return MIstatus::success;
61 //++ ------------------------------------------------------------------------------------
62 // Details: The invoker requires this function. The command prepares a MI Record Result
63 // for the work carried out in the Execute().
66 // Return: MIstatus::success - Functional succeeded.
67 // MIstatus::failure - Functional failed.
71 CMICmdCmdGdbThread::Acknowledge(void)
73 const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
74 const CMICmnMIValueResult miValueResult("msg", miValueConst);
75 const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult);
76 m_miResultRecord = miRecordResult;
78 return MIstatus::success;
81 //++ ------------------------------------------------------------------------------------
82 // Details: Required by the CMICmdFactory when registering *this command. The factory
83 // calls this function to create an instance of *this command.
84 // Type: Static method.
86 // Return: CMICmdBase * - Pointer to a new command.
90 CMICmdCmdGdbThread::CreateSelf(void)
92 return new CMICmdCmdGdbThread();