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 //===----------------------------------------------------------------------===//
11 // File: MICmdCmdGdbThread.cpp
13 // Overview: CMICmdCmdGdbThread implementation.
15 // Environment: Compilers: Visual C++ 12.
16 // gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 // Libraries: See MIReadmetxt.
23 #include "MICmdCmdGdbThread.h"
24 #include "MICmnMIResultRecord.h"
25 #include "MICmnMIValueConst.h"
27 //++ ------------------------------------------------------------------------------------
28 // Details: CMICmdCmdGdbThread constructor.
34 CMICmdCmdGdbThread::CMICmdCmdGdbThread( void )
36 // Command factory matches this name with that received from the stdin stream
37 m_strMiCmd = "thread";
39 // Required by the CMICmdFactory when registering *this command
40 m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
43 //++ ------------------------------------------------------------------------------------
44 // Details: CMICmdCmdThread destructor.
45 // Type: Overrideable.
50 CMICmdCmdGdbThread::~CMICmdCmdGdbThread( void )
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.
59 // Return: MIstatus::success - Functional succeeded.
60 // MIstatus::failure - Functional failed.
63 bool CMICmdCmdGdbThread::Execute( void )
67 return MIstatus::success;
70 //++ ------------------------------------------------------------------------------------
71 // Details: The invoker requires this function. The command prepares a MI Record Result
72 // for the work carried out in the Execute().
75 // Return: MIstatus::success - Functional succeeded.
76 // MIstatus::failure - Functional failed.
79 bool CMICmdCmdGdbThread::Acknowledge( void )
81 const CMICmnMIValueConst miValueConst( MIRSRC( IDS_WORD_NOT_IMPLEMENTED ) );
82 const CMICmnMIValueResult miValueResult( "msg", miValueConst );
83 const CMICmnMIResultRecord miRecordResult( m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult );
84 m_miResultRecord = miRecordResult;
86 return MIstatus::success;
89 //++ ------------------------------------------------------------------------------------
90 // Details: Required by the CMICmdFactory when registering *this command. The factory
91 // calls this function to create an instance of *this command.
92 // Type: Static method.
94 // Return: CMICmdBase * - Pointer to a new command.
97 CMICmdBase * CMICmdCmdGdbThread::CreateSelf( void )
99 return new CMICmdCmdGdbThread();