LLDB mainline
|
#include "NativeProcessLinux.h"
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <unistd.h>
#include <fstream>
#include <mutex>
#include <optional>
#include <sstream>
#include <string>
#include <unordered_map>
#include "NativeThreadLinux.h"
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#include "Plugins/Process/Utility/LinuxProcMaps.h"
#include "Procfs.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/ProcessLaunchInfo.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Host/ThreadLauncher.h"
#include "lldb/Host/common/NativeRegisterContext.h"
#include "lldb/Host/linux/Host.h"
#include "lldb/Host/linux/Ptrace.h"
#include "lldb/Host/linux/Uio.h"
#include "lldb/Host/posix/ProcessLauncherPosixFork.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/LLDBAssert.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StringExtractor.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Threading.h"
#include <linux/unistd.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/wait.h>
Go to the source code of this file.
Macros | |
#define | TRAP_HWBKPT 4 |
#define | HWCAP2_MTE (1 << 18) |
Functions | |
static bool | ProcessVmReadvSupported () |
static void | MaybeLogLaunchInfo (const ProcessLaunchInfo &info) |
static void | DisplayBytes (StreamString &s, void *bytes, uint32_t count) |
static void | PtraceDisplayBytes (int &req, void *data, size_t data_size) |
static Status | EnsureFDFlags (int fd, int flags) |
static llvm::Error | AddPtraceScopeNote (llvm::Error original_error) |
static std::optional< std::pair< lldb::pid_t, WaitStatus > > | WaitPid () |
Variables | |
static constexpr unsigned | k_ptrace_word_size = sizeof(void *) |
#define HWCAP2_MTE (1 << 18) |
Definition at line 70 of file NativeProcessLinux.cpp.
#define TRAP_HWBKPT 4 |
Definition at line 66 of file NativeProcessLinux.cpp.
|
static |
Definition at line 218 of file NativeProcessLinux.cpp.
References lldb_private::GetLog(), lldb_private::process_linux::GetPtraceScope(), and LLDB_LOG.
Referenced by lldb_private::process_linux::NativeProcessLinux::Attach().
|
static |
Definition at line 139 of file NativeProcessLinux.cpp.
References DEBUG_PTRACE_MAXBYTES, and lldb_private::Stream::Printf().
Referenced by PtraceDisplayBytes().
|
static |
Definition at line 201 of file NativeProcessLinux.cpp.
References error().
|
static |
Definition at line 113 of file NativeProcessLinux.cpp.
References lldb_private::ProcessInfo::GetArguments(), lldb_private::Args::GetConstArgumentVector(), lldb_private::ProcessLaunchInfo::GetFileActionForFD(), lldb_private::GetLog(), and LLDB_LOG.
Referenced by lldb_private::process_linux::NativeProcessLinux::Manager::Launch().
|
static |
Definition at line 80 of file NativeProcessLinux.cpp.
References lldb_private::GetLog(), LLDB_LOG, and process_vm_readv().
Referenced by lldb_private::process_linux::NativeProcessLinux::ReadMemory().
|
static |
Definition at line 148 of file NativeProcessLinux.cpp.
References DisplayBytes(), lldb_private::StreamString::GetData(), lldb_private::GetLog(), LLDB_LOGV, PTRACE_SETFPREGS, PTRACE_SETREGS, and PTRACE_SETREGSET.
Referenced by lldb_private::process_linux::NativeProcessLinux::PtraceWrapper().
|
static |
Definition at line 344 of file NativeProcessLinux.cpp.
References lldb_private::WaitStatus::Decode(), lldb::eErrorTypePOSIX, error(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::Process.
Referenced by lldb_private::process_linux::NativeProcessLinux::Manager::SigchldHandler().
|
staticconstexpr |
Definition at line 195 of file NativeProcessLinux.cpp.
Referenced by lldb_private::process_linux::NativeProcessLinux::ReadMemory(), and lldb_private::process_linux::NativeProcessLinux::WriteMemory().