]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilSystemOsx.cpp
Merge ^/head r275478 through r275622.
[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 CMIUtilSystemOsx::GetOSErrorMsg( const MIint vError, CMIUtilString & vrwErrorMsg  ) const
60 {
61         // Reset
62         vrwErrorMsg.clear();
63
64         bool bOk = MIstatus::failure;
65         
66         // ToDo: Implement LINUX version
67         
68         return bOk;
69 }
70
71 //++ ------------------------------------------------------------------------------------
72 // Details:     Retrieve if possible the OS last error description.
73 // Type:        Method.
74 // Args:        None.
75 // Return:      CMIUtilString - Error description.
76 // Throws:      None.
77 //--
78 CMIUtilString CMIUtilSystemOsx::GetOSLastError( void ) const
79 {
80         CMIUtilString errorMsg( "Error fn not implemented" );
81         
82         // ToDo: Implement LINUX version
83                 
84         return errorMsg;
85 }
86
87 //++ ------------------------------------------------------------------------------------
88 // Details:     Retrieves the fully qualified path for the this application. If the function
89 //                      fails the string is filled with the error message.
90 // Type:        Method.
91 // Args:        vrwFileNamePath - (W) The excutable's name and path or last error description.
92 // Return:      MIstatus::success - Functional succeeded.
93 //                      MIstatus::failure - Functional failed.
94 // Throws:      None.
95 //--
96 bool CMIUtilSystemOsx::GetExecutablesPath( CMIUtilString & vrwFileNamePath ) const
97 {
98         bool bOk = MIstatus::failure;
99         
100         // ToDo: Implement OSX version
101         
102         return bOk;
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 CMIUtilSystemOsx::GetLogFilesPath( CMIUtilString & vrwFileNamePath ) const
117 {
118         bool bOk = MIstatus::failure;
119         
120         // ToDo: Implement OSX version
121         
122         return bOk;
123 }
124
125 #endif // #if defined( __APPLE__ )