diff options
| author | Deepak Panickal <deepak@codeplay.com> | 2014-05-16 10:51:01 +0000 |
|---|---|---|
| committer | Deepak Panickal <deepak@codeplay.com> | 2014-05-16 10:51:01 +0000 |
| commit | 6f9c46810298dd00dc95d4ffb60faf7d914ab978 (patch) | |
| tree | 7d8abbb2b6cd0aa3dfb8824f318baa432bb9e3c4 /lldb/tools/lldb-mi/MIUtilSystemLinux.cpp | |
| parent | d04688d1c6cdffae4623a3a60e2d46f0bd72fe48 (diff) | |
| download | bcm5719-llvm-6f9c46810298dd00dc95d4ffb60faf7d914ab978.tar.gz bcm5719-llvm-6f9c46810298dd00dc95d4ffb60faf7d914ab978.zip | |
Initial commit of LLDB Machine Interface Frontend.
- Tested with Eclipse, likely to work with other GDB/MI compatible GUIs.
- Some but not all MI commands have been implemented. See MIReadme.txt for more info.
- Written from scratch, no GPL code, based on LLDB Public API.
- Built for Linux, Windows and OSX. Tested on Linux and Windows.
- GDB/MI Command Reference, https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html
llvm-svn: 208972
Diffstat (limited to 'lldb/tools/lldb-mi/MIUtilSystemLinux.cpp')
| -rw-r--r-- | lldb/tools/lldb-mi/MIUtilSystemLinux.cpp | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/lldb/tools/lldb-mi/MIUtilSystemLinux.cpp b/lldb/tools/lldb-mi/MIUtilSystemLinux.cpp new file mode 100644 index 00000000000..9805febb394 --- /dev/null +++ b/lldb/tools/lldb-mi/MIUtilSystemLinux.cpp @@ -0,0 +1,122 @@ +//===-- MIUtilSystemLinux.cpp -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +//++ +// File: MIUtilSystemLinux.cpp +// +// Overview: CMIUtilSystemLinux implementation. +// +// Environment: Compilers: Visual C++ 12. +// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 +// Libraries: See MIReadmetxt. +// +// Copyright: None. +//-- + +// Include compiler configuration +#include "MICmnConfig.h" + +#if defined( __linux ) + +// In-house headers: +#include "MIUtilSystemLinux.h" +#include "MICmnResources.h" + +//++ ------------------------------------------------------------------------------------ +// Details: CMIUtilSystemLinux constructor. +// Type: Method. +// Args: None. +// Return: None. +// Throws: None. +//-- +CMIUtilSystemLinux::CMIUtilSystemLinux( void ) +{ +} + +//++ ------------------------------------------------------------------------------------ +// Details: CMIUtilSystemLinux destructor. +// Type: Method. +// Args: None. +// Return: None. +// Throws: None. +//-- +CMIUtilSystemLinux::~CMIUtilSystemLinux( void ) +{ +} + +//++ ------------------------------------------------------------------------------------ +// Details: Retrieve the OS system error message for the given system error code. +// Type: Method. +// Args: vError - (R) OS error code value. +// vrwErrorMsg - (W) The error message. +// Return: MIstatus::success - Functional succeeded. +// MIstatus::failure - Functional failed. +// Throws: None. +//-- +bool CMIUtilSystemLinux::GetOSErrorMsg( const MIint vError, CMIUtilString & vrwErrorMsg ) const +{ + // Reset + vrwErrorMsg.clear(); + + bool bOk = MIstatus::failure; + + // ToDo: Implement LINUX version + + return bOk; +} + +//++ ------------------------------------------------------------------------------------ +// Details: Retrieve if possible the OS last error description. +// Type: Method. +// Args: None. +// Return: CMIUtilString - Error description. +// Throws: None. +//-- +CMIUtilString CMIUtilSystemLinux::GetOSLastError( void ) const +{ + CMIUtilString errorMsg( "Error fn not implemented " ); + + // ToDo: Implement LINUX version + + return errorMsg; +} + +//++ ------------------------------------------------------------------------------------ +// Details: Retrieves the fully qualified path for the this application. If the function +// fails the string is filled with the error message. +// Type: Method. +// Args: vrwFileNamePath - (W) The excutable's name and path or last error description. +// Return: MIstatus::success - Functional succeeded. +// MIstatus::failure - Functional failed. +// Throws: None. +//-- +bool CMIUtilSystemLinux::GetExecutablesPath( CMIUtilString & vrwFileNamePath ) const +{ + vrwFileNamePath = CMIUtilString( "." ); + return MIstatus::success; +} + +//++ ------------------------------------------------------------------------------------ +// Details: Retrieves the fully qualified path for the Log file for this application. +// If the function fails the string is filled with the error message. +// Append a dummy file name on the end of the path. This will be stripped off +// later and the real log file name replaces it. +// Type: Method. +// Args: vrwFileNamePath - (W) The Log file's name and path or last error description. +// Return: MIstatus::success - Functional succeeded. +// MIstatus::failure - Functional failed. +// Throws: None. +//-- +bool CMIUtilSystemLinux::GetLogFilesPath( CMIUtilString & vrwFileNamePath ) const +{ + vrwFileNamePath = CMIUtilString( "." ); + return MIstatus::success; +} + +#endif // #if defined( __linux ) |

