]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[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 //++
11 // File:        MICmdCmdGdbThread.cpp
12 //
13 // Overview:    CMICmdCmdGdbThread      implementation.
14 //
15 // Environment: Compilers:  Visual C++ 12.
16 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
17 //              Libraries:  See MIReadmetxt.
18 //
19 // Copyright:   None.
20 //--
21
22 // In-house headers:
23 #include "MICmdCmdGdbThread.h"
24 #include "MICmnMIResultRecord.h"
25 #include "MICmnMIValueConst.h"
26
27 //++ ------------------------------------------------------------------------------------
28 // Details: CMICmdCmdGdbThread constructor.
29 // Type:    Method.
30 // Args:    None.
31 // Return:  None.
32 // Throws:  None.
33 //--
34 CMICmdCmdGdbThread::CMICmdCmdGdbThread(void)
35 {
36     // Command factory matches this name with that received from the stdin stream
37     m_strMiCmd = "thread";
38
39     // Required by the CMICmdFactory when registering *this command
40     m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
41 }
42
43 //++ ------------------------------------------------------------------------------------
44 // Details: CMICmdCmdThread destructor.
45 // Type:    Overrideable.
46 // Args:    None.
47 // Return:  None.
48 // Throws:  None.
49 //--
50 CMICmdCmdGdbThread::~CMICmdCmdGdbThread(void)
51 {
52 }
53
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.
57 // Type:    Overridden.
58 // Args:    None.
59 // Return:  MIstatus::success - Functional succeeded.
60 //          MIstatus::failure - Functional failed.
61 // Throws:  None.
62 //--
63 bool
64 CMICmdCmdGdbThread::Execute(void)
65 {
66     // Do nothing
67
68     return MIstatus::success;
69 }
70
71 //++ ------------------------------------------------------------------------------------
72 // Details: The invoker requires this function. The command prepares a MI Record Result
73 //          for the work carried out in the Execute().
74 // Type:    Overridden.
75 // Args:    None.
76 // Return:  MIstatus::success - Functional succeeded.
77 //          MIstatus::failure - Functional failed.
78 // Throws:  None.
79 //--
80 bool
81 CMICmdCmdGdbThread::Acknowledge(void)
82 {
83     const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
84     const CMICmnMIValueResult miValueResult("msg", miValueConst);
85     const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error, miValueResult);
86     m_miResultRecord = miRecordResult;
87
88     return MIstatus::success;
89 }
90
91 //++ ------------------------------------------------------------------------------------
92 // Details: Required by the CMICmdFactory when registering *this command. The factory
93 //          calls this function to create an instance of *this command.
94 // Type:    Static method.
95 // Args:    None.
96 // Return:  CMICmdBase * - Pointer to a new command.
97 // Throws:  None.
98 //--
99 CMICmdBase *
100 CMICmdCmdGdbThread::CreateSelf(void)
101 {
102     return new CMICmdCmdGdbThread();
103 }