Go to the documentation of this file.
11 #include "lldb/Host/Config.h"
22 #if LLDB_ENABLE_PYTHON
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();
61 #if LLDB_ENABLE_PYTHON
62 fspec = ScriptInterpreterPython::GetPythonDir();
66 fspec = HostInfo::GetSystemPluginDir();
69 fspec = HostInfo::GetUserPluginDir();
72 fspec = HostInfo::GetProcessTempDir();
75 fspec = HostInfo::GetGlobalTempDir();
91 FileSystem::Instance().GetHomeDirectory(homedir);
92 FileSystem::Instance().Resolve(homedir);
102 void *thread_arg,
SBError *error_ptr) {
104 llvm::Expected<HostThread> thread =
105 ThreadLauncher::LaunchThread(name, [thread_function, thread_arg] {
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();
int void SetError(ValueType err, lldb::ErrorType type)
Set accessor with an error value and type.
void *(* thread_func_t)(void *)
HostNativeThread & GetNativeThread()
static lldb::thread_t ThreadCreate(const char *name, lldb::thread_func_t thread_function, void *thread_arg, lldb::SBError *err)
static bool ThreadDetach(lldb::thread_t thread, lldb::SBError *err)
FileSpec GetClangResourceDir()
#define LLDB_INSTRUMENT()
void SetFileSpec(const lldb_private::FileSpec &fspec)
PathType
Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are related to LLDB on the curren...
static llvm::raw_ostream & error(Stream &strm)
@ ePathTypeClangDir
Find path to Clang builtin headers.
@ ePathTypeGlobalLLDBTempSystemDir
The LLDB temp directory for this system, NOT cleaned up on a process exit.
@ ePathTypeLLDBUserPlugins
User plug-ins directory.
@ ePathTypeSupportExecutableDir
Find LLDB support executable directory (debugserver, etc)
static lldb::SBFileSpec GetProgramFileSpec()
static lldb::SBFileSpec GetUserHomeDirectory()
@ ePathTypeLLDBTempSystemDir
The LLDB temp directory for this system that will be cleaned up on exit.
static lldb::SBFileSpec GetLLDBPath(lldb::PathType path_type)
static bool ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result, lldb::SBError *err)
Status Join(lldb::thread_result_t *result)
static bool ThreadCancel(lldb::thread_t thread, lldb::SBError *err)
@ ePathTypeLLDBSystemPlugins
System plug-ins directory.
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
static void ThreadCreated(const char *name)
@ ePathTypePythonDir
Find Python modules (PYTHONPATH) directory.
A class that represents a running process on the host machine.
@ ePathTypeLLDBShlibDir
The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists.
#define LLDB_INSTRUMENT_VA(...)
static lldb::SBFileSpec GetLLDBPythonPath()
#define LLDB_INVALID_HOST_THREAD
@ ePathTypeHeaderDir
Find LLDB header file directory.