llvm/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

//===-- PlatformDarwin.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 "PlatformDarwin.h"

#include <cstring>

#include <algorithm>
#include <memory>
#include <mutex>
#include <optional>

#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Breakpoint/BreakpointSite.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Section.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/XML.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/OptionValueProperties.h"
#include "lldb/Interpreter/OptionValueString.h"
#include "lldb/Interpreter/Options.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/ProcessInfo.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/Timer.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/VersionTuple.h"

#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif

usingnamespacelldb;
usingnamespacelldb_private;

static Status ExceptionMaskValidator(const char *string, void *unused) {}

/// Destructor.
///
/// The destructor is virtual since this class is designed to be
/// inherited from by the plug-in instance.
PlatformDarwin::~PlatformDarwin() = default;

// Static Variables
static uint32_t g_initialize_count =;

void PlatformDarwin::Initialize() {}

void PlatformDarwin::Terminate() {}

llvm::StringRef PlatformDarwin::GetDescriptionStatic() {}

PlatformSP PlatformDarwin::CreateInstance(bool force, const ArchSpec *arch) {}

#define LLDB_PROPERTIES_platformdarwin
#include "PlatformMacOSXProperties.inc"

#define LLDB_PROPERTIES_platformdarwin
enum {};

class PlatformDarwinProperties : public Properties {};

static PlatformDarwinProperties &GetGlobalProperties() {}

void PlatformDarwin::DebuggerInitialize(
    lldb_private::Debugger &debugger) {}

Args
PlatformDarwin::GetExtraStartupCommands() {}

lldb_private::Status
PlatformDarwin::PutFile(const lldb_private::FileSpec &source,
                        const lldb_private::FileSpec &destination, uint32_t uid,
                        uint32_t gid) {}

FileSpecList PlatformDarwin::LocateExecutableScriptingResources(
    Target *target, Module &module, Stream &feedback_stream) {}

Status PlatformDarwin::ResolveSymbolFile(Target &target,
                                         const ModuleSpec &sym_spec,
                                         FileSpec &sym_file) {}

Status PlatformDarwin::GetSharedModule(
    const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
    const FileSpecList *module_search_paths_ptr,
    llvm::SmallVectorImpl<ModuleSP> *old_modules, bool *did_create_ptr) {}

size_t
PlatformDarwin::GetSoftwareBreakpointTrapOpcode(Target &target,
                                                BreakpointSite *bp_site) {}

bool PlatformDarwin::ModuleIsExcludedForUnconstrainedSearches(
    lldb_private::Target &target, const lldb::ModuleSP &module_sp) {}

void PlatformDarwin::x86GetSupportedArchitectures(
    std::vector<ArchSpec> &archs) {}

static llvm::ArrayRef<const char *> GetCompatibleArchs(ArchSpec::Core core) {}

/// The architecture selection rules for arm processors These cpu subtypes have
/// distinct names (e.g. armv7f) but armv7 binaries run fine on an armv7f
/// processor.
void PlatformDarwin::ARMGetSupportedArchitectures(
    std::vector<ArchSpec> &archs, std::optional<llvm::Triple::OSType> os) {}

static FileSpec GetXcodeSelectPath() {}

BreakpointSP PlatformDarwin::SetThreadCreationBreakpoint(Target &target) {}

uint32_t
PlatformDarwin::GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info) {}

lldb::ProcessSP PlatformDarwin::DebugProcess(ProcessLaunchInfo &launch_info,
                                             Debugger &debugger, Target &target,
                                             Status &error) {}

void PlatformDarwin::CalculateTrapHandlerSymbolNames() {}

static FileSpec GetCommandLineToolsLibraryPath() {}

FileSystem::EnumerateDirectoryResult PlatformDarwin::DirectoryEnumerator(
    void *baton, llvm::sys::fs::file_type file_type, llvm::StringRef path) {}

FileSpec PlatformDarwin::FindSDKInXcodeForModules(XcodeSDK::Type sdk_type,
                                                  const FileSpec &sdks_spec) {}

FileSpec PlatformDarwin::GetSDKDirectoryForModules(XcodeSDK::Type sdk_type) {}

std::tuple<llvm::VersionTuple, llvm::StringRef>
PlatformDarwin::ParseVersionBuildDir(llvm::StringRef dir) {}

llvm::Expected<StructuredData::DictionarySP>
PlatformDarwin::FetchExtendedCrashInformation(Process &process) {}

StructuredData::ArraySP
PlatformDarwin::ExtractCrashInfoAnnotations(Process &process) {}

StructuredData::DictionarySP
PlatformDarwin::ExtractAppSpecificInfo(Process &process) {}

void PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
    Target *target, std::vector<std::string> &options, XcodeSDK::Type sdk_type) {}

ConstString PlatformDarwin::GetFullNameForDylib(ConstString basename) {}

llvm::VersionTuple PlatformDarwin::GetOSVersion(Process *process) {}

lldb_private::FileSpec PlatformDarwin::LocateExecutable(const char *basename) {}

lldb_private::Status
PlatformDarwin::LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info) {}

lldb_private::Status PlatformDarwin::FindBundleBinaryInExecSearchPaths(
    const ModuleSpec &module_spec, Process *process, ModuleSP &module_sp,
    const FileSpecList *module_search_paths_ptr,
    llvm::SmallVectorImpl<ModuleSP> *old_modules, bool *did_create_ptr) {}

std::string PlatformDarwin::FindComponentInPath(llvm::StringRef path,
                                                llvm::StringRef component) {}

FileSpec PlatformDarwin::GetCurrentToolchainDirectory() {}

FileSpec PlatformDarwin::GetCurrentCommandLineToolsDirectory() {}

llvm::Triple::OSType PlatformDarwin::GetHostOSType() {}

llvm::Expected<std::pair<XcodeSDK, bool>>
PlatformDarwin::GetSDKPathFromDebugInfo(Module &module) {}

llvm::Expected<std::string>
PlatformDarwin::ResolveSDKPathFromDebugInfo(Module &module) {}