summaryrefslogtreecommitdiff
path: root/include/lldb/Host
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-01 13:24:58 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-01 13:24:58 +0000
commit1b306c26ade71504511d2fa75b03dfaee77f9620 (patch)
tree2c4c77af2ba9632c24ebf216b9a39989d74f5725 /include/lldb/Host
parentfdea456ad833fbab0d3a296a58250950f11a498c (diff)
downloadsrc-test2-1b306c26ade71504511d2fa75b03dfaee77f9620.tar.gz
src-test2-1b306c26ade71504511d2fa75b03dfaee77f9620.zip
Notes
Diffstat (limited to 'include/lldb/Host')
-rw-r--r--include/lldb/Host/File.h2
-rw-r--r--include/lldb/Host/Host.h3
-rw-r--r--include/lldb/Host/IOObject.h56
-rw-r--r--include/lldb/Host/MainLoopBase.h8
-rw-r--r--include/lldb/Host/Socket.h2
-rw-r--r--include/lldb/Host/XML.h2
-rw-r--r--include/lldb/Host/common/NativeProcessProtocol.h18
-rw-r--r--include/lldb/Host/linux/Support.h3
-rw-r--r--include/lldb/Host/posix/ConnectionFileDescriptorPosix.h4
-rw-r--r--include/lldb/Host/windows/ConnectionGenericFileWindows.h2
10 files changed, 24 insertions, 76 deletions
diff --git a/include/lldb/Host/File.h b/include/lldb/Host/File.h
index 560a655237f3..1dfa12ea593d 100644
--- a/include/lldb/Host/File.h
+++ b/include/lldb/Host/File.h
@@ -10,8 +10,8 @@
#ifndef liblldb_File_h_
#define liblldb_File_h_
-#include "lldb/Host/IOObject.h"
#include "lldb/Host/PosixApi.h"
+#include "lldb/Utility/IOObject.h"
#include "lldb/Utility/Status.h"
#include "lldb/lldb-private.h"
diff --git a/include/lldb/Host/Host.h b/include/lldb/Host/Host.h
index bf48e207f1f2..c41e4796f532 100644
--- a/include/lldb/Host/Host.h
+++ b/include/lldb/Host/Host.h
@@ -238,6 +238,9 @@ public:
uint32_t line_no);
static size_t GetEnvironment(StringList &env);
+
+ static std::unique_ptr<Connection>
+ CreateDefaultConnection(llvm::StringRef url);
};
} // namespace lldb_private
diff --git a/include/lldb/Host/IOObject.h b/include/lldb/Host/IOObject.h
deleted file mode 100644
index 98ad5056de74..000000000000
--- a/include/lldb/Host/IOObject.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//===-- IOObject.h ----------------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_Host_Common_IOObject_h_
-#define liblldb_Host_Common_IOObject_h_
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "lldb/lldb-private.h"
-
-namespace lldb_private {
-
-class IOObject {
-public:
- typedef enum {
- eFDTypeFile, // Other FD requiring read/write
- eFDTypeSocket, // Socket requiring send/recv
- } FDType;
-
- // TODO: On Windows this should be a HANDLE, and wait should use
- // WaitForMultipleObjects
- typedef int WaitableHandle;
- static const WaitableHandle kInvalidHandleValue;
-
- IOObject(FDType type, bool should_close)
- : m_fd_type(type), m_should_close_fd(should_close) {}
- virtual ~IOObject() {}
-
- virtual Status Read(void *buf, size_t &num_bytes) = 0;
- virtual Status Write(const void *buf, size_t &num_bytes) = 0;
- virtual bool IsValid() const = 0;
- virtual Status Close() = 0;
-
- FDType GetFdType() const { return m_fd_type; }
-
- virtual WaitableHandle GetWaitableHandle() = 0;
-
-protected:
- FDType m_fd_type;
- bool m_should_close_fd; // True if this class should close the file descriptor
- // when it goes away.
-
-private:
- DISALLOW_COPY_AND_ASSIGN(IOObject);
-};
-}
-
-#endif
diff --git a/include/lldb/Host/MainLoopBase.h b/include/lldb/Host/MainLoopBase.h
index 39ca9a0f0c9e..a87d262e9452 100644
--- a/include/lldb/Host/MainLoopBase.h
+++ b/include/lldb/Host/MainLoopBase.h
@@ -10,12 +10,10 @@
#ifndef lldb_Host_posix_MainLoopBase_h_
#define lldb_Host_posix_MainLoopBase_h_
-#include <functional>
-
-#include "llvm/Support/ErrorHandling.h"
-
-#include "lldb/Host/IOObject.h"
+#include "lldb/Utility/IOObject.h"
#include "lldb/Utility/Status.h"
+#include "llvm/Support/ErrorHandling.h"
+#include <functional>
namespace lldb_private {
diff --git a/include/lldb/Host/Socket.h b/include/lldb/Host/Socket.h
index c4233a233a89..37f468f23ce0 100644
--- a/include/lldb/Host/Socket.h
+++ b/include/lldb/Host/Socket.h
@@ -15,9 +15,9 @@
#include "lldb/lldb-private.h"
-#include "lldb/Host/IOObject.h"
#include "lldb/Host/Predicate.h"
#include "lldb/Host/SocketAddress.h"
+#include "lldb/Utility/IOObject.h"
#include "lldb/Utility/Status.h"
#ifdef _WIN32
diff --git a/include/lldb/Host/XML.h b/include/lldb/Host/XML.h
index 04677625672c..96b5227305e1 100644
--- a/include/lldb/Host/XML.h
+++ b/include/lldb/Host/XML.h
@@ -24,8 +24,8 @@
#include "llvm/ADT/StringRef.h"
// Project includes
-#include "lldb/Core/StructuredData.h"
#include "lldb/Utility/StreamString.h"
+#include "lldb/Utility/StructuredData.h"
#include "lldb/lldb-private.h"
namespace lldb_private {
diff --git a/include/lldb/Host/common/NativeProcessProtocol.h b/include/lldb/Host/common/NativeProcessProtocol.h
index c43299a1df3d..a97540499cd3 100644
--- a/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/include/lldb/Host/common/NativeProcessProtocol.h
@@ -10,10 +10,10 @@
#ifndef liblldb_NativeProcessProtocol_h_
#define liblldb_NativeProcessProtocol_h_
-#include "lldb/Core/TraceOptions.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/MainLoop.h"
#include "lldb/Utility/Status.h"
+#include "lldb/Utility/TraceOptions.h"
#include "lldb/lldb-private-forward.h"
#include "lldb/lldb-types.h"
#include "llvm/ADT/ArrayRef.h"
@@ -333,7 +333,7 @@ public:
//------------------------------------------------------------------
/// StopTracing API as the name suggests stops a tracing instance.
///
- /// @param[in] uid
+ /// @param[in] traceid
/// The user id of the trace intended to be stopped. Now a
/// user_id may map to multiple threads in which case this API
/// could be used to stop the tracing for a specific thread by
@@ -346,7 +346,7 @@ public:
/// @return
/// Status indicating what went wrong.
//------------------------------------------------------------------
- virtual Status StopTrace(lldb::user_id_t uid,
+ virtual Status StopTrace(lldb::user_id_t traceid,
lldb::tid_t thread = LLDB_INVALID_THREAD_ID) {
return Status("Not implemented");
}
@@ -355,8 +355,8 @@ public:
/// This API provides the trace data collected in the form of raw
/// data.
///
- /// @param[in] uid thread
- /// The uid and thread provide the context for the trace
+ /// @param[in] traceid thread
+ /// The traceid and thread provide the context for the trace
/// instance.
///
/// @param[in] buffer
@@ -372,7 +372,7 @@ public:
/// @return
/// The size of the data actually read.
//------------------------------------------------------------------
- virtual Status GetData(lldb::user_id_t uid, lldb::tid_t thread,
+ virtual Status GetData(lldb::user_id_t traceid, lldb::tid_t thread,
llvm::MutableArrayRef<uint8_t> &buffer,
size_t offset = 0) {
return Status("Not implemented");
@@ -382,7 +382,7 @@ public:
/// Similar API as above except it aims to provide any extra data
/// useful for decoding the actual trace data.
//------------------------------------------------------------------
- virtual Status GetMetaData(lldb::user_id_t uid, lldb::tid_t thread,
+ virtual Status GetMetaData(lldb::user_id_t traceid, lldb::tid_t thread,
llvm::MutableArrayRef<uint8_t> &buffer,
size_t offset = 0) {
return Status("Not implemented");
@@ -391,7 +391,7 @@ public:
//------------------------------------------------------------------
/// API to query the TraceOptions for a given user id
///
- /// @param[in] uid
+ /// @param[in] traceid
/// The user id of the tracing instance.
///
/// @param[in] config
@@ -405,7 +405,7 @@ public:
/// @param[out] config
/// The actual configuration being used for tracing.
//------------------------------------------------------------------
- virtual Status GetTraceConfig(lldb::user_id_t uid, TraceOptions &config) {
+ virtual Status GetTraceConfig(lldb::user_id_t traceid, TraceOptions &config) {
return Status("Not implemented");
}
diff --git a/include/lldb/Host/linux/Support.h b/include/lldb/Host/linux/Support.h
index dae76c78fb4a..8415aa6c4320 100644
--- a/include/lldb/Host/linux/Support.h
+++ b/include/lldb/Host/linux/Support.h
@@ -22,6 +22,9 @@ getProcFile(::pid_t pid, ::pid_t tid, const llvm::Twine &file);
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
getProcFile(::pid_t pid, const llvm::Twine &file);
+llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
+getProcFile(const llvm::Twine &file);
+
} // namespace lldb_private
#endif // #ifndef LLDB_HOST_LINUX_SUPPORT_H
diff --git a/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h b/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
index f57c93684002..b7e08eb33af7 100644
--- a/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
+++ b/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
@@ -19,10 +19,10 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/Core/Connection.h"
-#include "lldb/Host/IOObject.h"
#include "lldb/Host/Pipe.h"
#include "lldb/Host/Predicate.h"
+#include "lldb/Utility/Connection.h"
+#include "lldb/Utility/IOObject.h"
namespace lldb_private {
diff --git a/include/lldb/Host/windows/ConnectionGenericFileWindows.h b/include/lldb/Host/windows/ConnectionGenericFileWindows.h
index 9309288b8c0a..5907ff16d9c3 100644
--- a/include/lldb/Host/windows/ConnectionGenericFileWindows.h
+++ b/include/lldb/Host/windows/ConnectionGenericFileWindows.h
@@ -10,8 +10,8 @@
#ifndef liblldb_Host_windows_ConnectionGenericFileWindows_h_
#define liblldb_Host_windows_ConnectionGenericFileWindows_h_
-#include "lldb/Core/Connection.h"
#include "lldb/Host/windows/windows.h"
+#include "lldb/Utility/Connection.h"
#include "lldb/lldb-types.h"
namespace lldb_private {