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