#include "PlatformPOSIX.h"
#include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/FunctionCaller.h"
#include "lldb/Expression/UserExpression.h"
#include "lldb/Expression/UtilityFunction.h"
#include "lldb/Host/File.h"
#include "lldb/Host/FileCache.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Target/DynamicLoader.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Thread.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/ScopeExit.h"
#include <optional>
usingnamespacelldb;
usingnamespacelldb_private;
PlatformPOSIX::PlatformPOSIX(bool is_host)
: … { … }
PlatformPOSIX::~PlatformPOSIX() = default;
lldb_private::OptionGroupOptions *PlatformPOSIX::GetConnectionOptions(
lldb_private::CommandInterpreter &interpreter) { … }
static uint32_t chown_file(Platform *platform, const char *path,
uint32_t uid = UINT32_MAX,
uint32_t gid = UINT32_MAX) { … }
lldb_private::Status
PlatformPOSIX::PutFile(const lldb_private::FileSpec &source,
const lldb_private::FileSpec &destination, uint32_t uid,
uint32_t gid) { … }
lldb_private::Status PlatformPOSIX::GetFile(
const lldb_private::FileSpec &source,
const lldb_private::FileSpec &destination)
{ … }
std::string PlatformPOSIX::GetPlatformSpecificConnectionInformation() { … }
const lldb::UnixSignalsSP &PlatformPOSIX::GetRemoteUnixSignals() { … }
Status PlatformPOSIX::ConnectRemote(Args &args) { … }
Status PlatformPOSIX::DisconnectRemote() { … }
lldb::ProcessSP PlatformPOSIX::Attach(ProcessAttachInfo &attach_info,
Debugger &debugger, Target *target,
Status &error) { … }
lldb::ProcessSP PlatformPOSIX::DebugProcess(ProcessLaunchInfo &launch_info,
Debugger &debugger, Target &target,
Status &error) { … }
void PlatformPOSIX::CalculateTrapHandlerSymbolNames() { … }
Status PlatformPOSIX::EvaluateLibdlExpression(
lldb_private::Process *process, const char *expr_cstr,
llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp) { … }
std::unique_ptr<UtilityFunction>
PlatformPOSIX::MakeLoadImageUtilityFunction(ExecutionContext &exe_ctx,
Status &error) { … }
uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process,
const lldb_private::FileSpec &remote_file,
const std::vector<std::string> *paths,
lldb_private::Status &error,
lldb_private::FileSpec *loaded_image) { … }
Status PlatformPOSIX::UnloadImage(lldb_private::Process *process,
uint32_t image_token) { … }
llvm::StringRef
PlatformPOSIX::GetLibdlFunctionDeclarations(lldb_private::Process *process) { … }
ConstString PlatformPOSIX::GetFullNameForDylib(ConstString basename) { … }