11#include "lldb/Host/Config.h"
26#include "llvm/ADT/SmallString.h"
27#include "llvm/Support/Path.h"
36 sb_filespec.
SetFileSpec(HostInfo::GetProgramFileSpec());
52 fspec = HostInfo::GetShlibDir();
55 fspec = HostInfo::GetSupportExeDir();
58 fspec = HostInfo::GetHeaderDir();
62 fspec = ScriptInterpreterPython::GetPythonDir();
66 fspec = HostInfo::GetSystemPluginDir();
69 fspec = HostInfo::GetUserPluginDir();
72 fspec = HostInfo::GetProcessTempDir();
75 fspec = HostInfo::GetGlobalTempDir();
102 void *thread_arg,
SBError *error_ptr) {
104 llvm::Expected<HostThread> thread =
106 return thread_function(thread_arg);
112 llvm::consumeError(thread.takeError());
116 return thread->Release();
130 return error.Success();
139 error_ptr->
SetErrorString(
"ThreadDetach is not supported on this platform");
147 return error.Success();
160 return error.Success();
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
void SetFileSpec(const lldb_private::FileSpec &fspec)
static lldb::SBFileSpec GetUserHomeDirectory()
static lldb::SBFileSpec GetProgramFileSpec()
static lldb::thread_t ThreadCreate(const char *name, lldb::thread_func_t thread_function, void *thread_arg, lldb::SBError *err)
static lldb::SBFileSpec GetLLDBPythonPath()
static bool ThreadDetach(lldb::thread_t thread, lldb::SBError *err)
static void ThreadCreated(const char *name)
static bool ThreadCancel(lldb::thread_t thread, lldb::SBError *err)
static bool ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result, lldb::SBError *err)
static lldb::SBFileSpec GetLLDBPath(lldb::PathType path_type)
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
bool GetHomeDirectory(llvm::SmallVectorImpl< char > &path) const
Get the user home directory.
static FileSystem & Instance()
Status Join(lldb::thread_result_t *result)
HostNativeThread & GetNativeThread()
int void SetError(ValueType err, lldb::ErrorType type)
Set accessor with an error value and type.
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
static llvm::Expected< HostThread > LaunchThread(llvm::StringRef name, std::function< lldb::thread_result_t()> thread_function, size_t min_stack_byte_size=0)
#define LLDB_INVALID_HOST_THREAD
A class that represents a running process on the host machine.
FileSpec GetClangResourceDir()
PathType
Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are related to LLDB on the curren...
@ ePathTypeGlobalLLDBTempSystemDir
The LLDB temp directory for this system, NOT cleaned up on a process exit.
@ ePathTypeHeaderDir
Find LLDB header file directory.
@ ePathTypeLLDBSystemPlugins
System plug-ins directory.
@ ePathTypeLLDBTempSystemDir
The LLDB temp directory for this system that will be cleaned up on exit.
@ ePathTypeClangDir
Find path to Clang builtin headers.
@ ePathTypeLLDBUserPlugins
User plug-ins directory.
@ ePathTypeSupportExecutableDir
Find LLDB support executable directory (debugserver, etc)
@ ePathTypePythonDir
Find Python modules (PYTHONPATH) directory.
@ ePathTypeLLDBShlibDir
The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists.
void *(* thread_func_t)(void *)