]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp
Merge OpenSSL 1.0.2e.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdCmdGdbThread.cpp
1 //===-- MICmdCmdGdbThread.cpp -----------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // Overview:    CMICmdCmdGdbThread      implementation.
11
12 // In-house headers:
13 #include "MICmdCmdGdbThread.h"
14 #include "MICmnMIResultRecord.h"
15 #include "MICmnMIValueConst.h"
16
17 //++ ------------------------------------------------------------------------------------
18 // Details: CMICmdCmdGdbThread constructor.
19 // Type:    Method.
20 // Args:    None.
21 // Return:  None.
22 // Throws:  None.
23 //--
24 CMICmdCmdGdbThread::CMICmdCmdGdbThread(void)
25 {
26     // Command factory matches this name with that received from the stdin stream
27     m_strMiCmd = "thread";
28
29     // Required by the CMICmdFactory when registering *this command
30     m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
31 }
32
33 //++ ------------------------------------------------------------------------------------
34 // Details: CMICmdCmdThread destructor.
35 // Type:    Overrideable.
36 // Args:    None.
37 // Return:  None.
38 // Throws:  None.
39 //--
40 CMICmdCmdGdbThread::~CMICmdCmdGdbThread(void)
41 {
42 }
43
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.
47 // Type:    Overridden.
48 // Args:    None.
49 // Return:  MIstatus::success - Functional succeeded.
50 //          MIstatus::failure - Functional failed.
51 // Throws:  None.
52 //--
53 bool
54 CMICmdCmdGdbThread::Execute(void)
55 {
56     // Do nothing
57
58     return MIstatus::success;
59 }
60
61 //++ ------------------------------------------------------------------------------------
62 // Details: The invoker requires this function. The command prepares a MI Record Result
63 //          for the work carried out in the Execute().
64 // Type:    Overridden.
65 // Args:    None.
66 // Return:  MIstatus::success - Functional succeeded.
67 //          MIstatus::failure - Functional failed.
68 // Throws:  None.
69 //--
70 bool
71 CMICmdCmdGdbThread::Acknowledge(void)
72 {
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;
77
78     return MIstatus::success;
79 }
80
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.
85 // Args:    None.
86 // Return:  CMICmdBase * - Pointer to a new command.
87 // Throws:  None.
88 //--
89 CMICmdBase *
90 CMICmdCmdGdbThread::CreateSelf(void)
91 {
92     return new CMICmdCmdGdbThread();
93 }