]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.cpp
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MIUtilSystemOsx.cpp
1 //===-- MIUtilSystemOsx.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:        MIUtilSystemOsx.cpp
12 //
13 // Overview:    CMIUtilSystemOsx 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 #if defined(__APPLE__)
23
24 // In-house headers:
25 #include "MIUtilSystemOsx.h"
26 #include "MICmnResources.h"
27
28 //++ ------------------------------------------------------------------------------------
29 // Details: CMIUtilSystemOsx constructor.
30 // Type:    Method.
31 // Args:    None.
32 // Return:  None.
33 // Throws:  None.
34 //--
35 CMIUtilSystemOsx::CMIUtilSystemOsx(void)
36 {
37 }
38
39 //++ ------------------------------------------------------------------------------------
40 // Details: CMIUtilSystemOsx destructor.
41 // Type:    Method.
42 // Args:    None.
43 // Return:  None.
44 // Throws:  None.
45 //--
46 CMIUtilSystemOsx::~CMIUtilSystemOsx(void)
47 {
48 }
49
50 //++ ------------------------------------------------------------------------------------
51 // Details: Retrieve the OS system error message for the given system error code.
52 // Type:    Method.
53 // Args:    vError              - (R) OS error code value.
54 //          vrwErrorMsg - (W) The error message.
55 // Return:  MIstatus::success - Functional succeeded.
56 //          MIstatus::failure - Functional failed.
57 // Throws:  None.
58 //--
59 bool
60 CMIUtilSystemOsx::GetOSErrorMsg(const MIint vError, CMIUtilString &vrwErrorMsg) const
61 {
62     // Reset
63     vrwErrorMsg.clear();
64
65     bool bOk = MIstatus::failure;
66
67     // ToDo: Implement LINUX version
68
69     return bOk;
70 }
71
72 //++ ------------------------------------------------------------------------------------
73 // Details: Retrieve if possible the OS last error description.
74 // Type:    Method.
75 // Args:    None.
76 // Return:  CMIUtilString - Error description.
77 // Throws:  None.
78 //--
79 CMIUtilString
80 CMIUtilSystemOsx::GetOSLastError(void) const
81 {
82     CMIUtilString errorMsg("Error fn not implemented");
83
84     // ToDo: Implement LINUX version
85
86     return errorMsg;
87 }
88
89 //++ ------------------------------------------------------------------------------------
90 // Details: Retrieves the fully qualified path for the this application. If the function
91 //          fails the string is filled with the error message.
92 // Type:    Method.
93 // Args:    vrwFileNamePath     - (W) The excutable's name and path or last error description.
94 // Return:  MIstatus::success - Functional succeeded.
95 //          MIstatus::failure - Functional failed.
96 // Throws:  None.
97 //--
98 bool
99 CMIUtilSystemOsx::GetExecutablesPath(CMIUtilString &vrwFileNamePath) const
100 {
101     vrwFileNamePath = CMIUtilString(".");
102     return MIstatus::success;
103 }
104
105 //++ ------------------------------------------------------------------------------------
106 // Details: Retrieves the fully qualified path for the Log file for this application.
107 //          If the function fails the string is filled with the error message.
108 //          Append a dummy file name on the end of the path. This will be stripped off
109 //          later and the real log file name replaces it.
110 // Type:    Method.
111 // Args:    vrwFileNamePath     - (W) The Log file's name and path or last error description.
112 // Return:  MIstatus::success - Functional succeeded.
113 //          MIstatus::failure - Functional failed.
114 // Throws:  None.
115 //--
116 bool
117 CMIUtilSystemOsx::GetLogFilesPath(CMIUtilString &vrwFileNamePath) const
118 {
119     vrwFileNamePath = CMIUtilString(".");
120     return MIstatus::success;
121 }
122
123 #endif // #if defined( __APPLE__ )