CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
122 lines
3.4 KiB
C++
122 lines
3.4 KiB
C++
//===-- SBHostOS.cpp ------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "lldb/API/SBHostOS.h"
|
|
#include "lldb/API/SBError.h"
|
|
#include "lldb/Core/PluginManager.h"
|
|
#include "lldb/Host/Config.h"
|
|
#include "lldb/Host/FileSystem.h"
|
|
#include "lldb/Host/Host.h"
|
|
#include "lldb/Host/HostInfo.h"
|
|
#include "lldb/Host/HostNativeThread.h"
|
|
#include "lldb/Host/HostThread.h"
|
|
#include "lldb/Host/ThreadLauncher.h"
|
|
#include "lldb/Utility/FileSpec.h"
|
|
#include "lldb/Utility/Instrumentation.h"
|
|
|
|
#include "Plugins/ExpressionParser/Clang/ClangHost.h"
|
|
|
|
#include "llvm/ADT/SmallString.h"
|
|
#include "llvm/Support/Path.h"
|
|
|
|
using namespace lldb;
|
|
using namespace lldb_private;
|
|
|
|
SBFileSpec SBHostOS::GetProgramFileSpec() {
|
|
LLDB_INSTRUMENT();
|
|
|
|
SBFileSpec sb_filespec;
|
|
sb_filespec.SetFileSpec(HostInfo::GetProgramFileSpec());
|
|
return sb_filespec;
|
|
}
|
|
|
|
SBFileSpec SBHostOS::GetLLDBPythonPath() {
|
|
LLDB_INSTRUMENT();
|
|
|
|
return GetScriptPath(lldb::eScriptLanguagePython);
|
|
}
|
|
|
|
SBFileSpec SBHostOS::GetScriptPath(lldb::ScriptLanguage language) {
|
|
LLDB_INSTRUMENT();
|
|
|
|
SBFileSpec sb_fspec;
|
|
sb_fspec.SetFileSpec(
|
|
PluginManager::GetScriptInterpreterLibraryPath(language));
|
|
return sb_fspec;
|
|
}
|
|
|
|
SBFileSpec SBHostOS::GetLLDBPath(lldb::PathType path_type) {
|
|
LLDB_INSTRUMENT_VA(path_type);
|
|
|
|
FileSpec fspec;
|
|
switch (path_type) {
|
|
case ePathTypeLLDBShlibDir:
|
|
fspec = HostInfo::GetShlibDir();
|
|
break;
|
|
case ePathTypeSupportExecutableDir:
|
|
fspec = HostInfo::GetSupportExeDir();
|
|
break;
|
|
case ePathTypeHeaderDir:
|
|
fspec = HostInfo::GetHeaderDir();
|
|
break;
|
|
case ePathTypePythonDir:
|
|
fspec = PluginManager::GetScriptInterpreterLibraryPath(
|
|
lldb::eScriptLanguagePython);
|
|
break;
|
|
case ePathTypeLLDBSystemPlugins:
|
|
fspec = HostInfo::GetSystemPluginDir();
|
|
break;
|
|
case ePathTypeLLDBUserPlugins:
|
|
fspec = HostInfo::GetUserPluginDir();
|
|
break;
|
|
case ePathTypeLLDBTempSystemDir:
|
|
fspec = HostInfo::GetProcessTempDir();
|
|
break;
|
|
case ePathTypeGlobalLLDBTempSystemDir:
|
|
fspec = HostInfo::GetGlobalTempDir();
|
|
break;
|
|
case ePathTypeClangDir:
|
|
fspec = GetClangResourceDir();
|
|
break;
|
|
}
|
|
|
|
SBFileSpec sb_fspec;
|
|
sb_fspec.SetFileSpec(fspec);
|
|
return sb_fspec;
|
|
}
|
|
|
|
SBFileSpec SBHostOS::GetUserHomeDirectory() {
|
|
LLDB_INSTRUMENT();
|
|
return HostInfo::GetUserHomeDir();
|
|
}
|
|
|
|
lldb::thread_t SBHostOS::ThreadCreate(const char *name,
|
|
lldb::thread_func_t thread_function,
|
|
void *thread_arg, SBError *error_ptr) {
|
|
LLDB_INSTRUMENT_VA(name, thread_function, thread_arg, error_ptr);
|
|
return LLDB_INVALID_HOST_THREAD;
|
|
}
|
|
|
|
void SBHostOS::ThreadCreated(const char *name) { LLDB_INSTRUMENT_VA(name); }
|
|
|
|
bool SBHostOS::ThreadCancel(lldb::thread_t thread, SBError *error_ptr) {
|
|
LLDB_INSTRUMENT_VA(thread, error_ptr);
|
|
return false;
|
|
}
|
|
|
|
bool SBHostOS::ThreadDetach(lldb::thread_t thread, SBError *error_ptr) {
|
|
LLDB_INSTRUMENT_VA(thread, error_ptr);
|
|
return false;
|
|
}
|
|
|
|
bool SBHostOS::ThreadJoin(lldb::thread_t thread, lldb::thread_result_t *result,
|
|
SBError *error_ptr) {
|
|
LLDB_INSTRUMENT_VA(thread, result, error_ptr);
|
|
return false;
|
|
}
|