LLDB  mainline
Macros | Functions | Variables
NativeProcessLinux.cpp File Reference
#include "NativeProcessLinux.h"
#include <cerrno>
#include <cstdint>
#include <cstring>
#include <unistd.h>
#include <fstream>
#include <mutex>
#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/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/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>
Include dependency graph for NativeProcessLinux.cpp:

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)
 

Variables

static constexpr unsigned k_ptrace_word_size = sizeof(void *)
 

Macro Definition Documentation

◆ HWCAP2_MTE

#define HWCAP2_MTE   (1 << 18)

Definition at line 67 of file NativeProcessLinux.cpp.

◆ TRAP_HWBKPT

#define TRAP_HWBKPT   4

Definition at line 63 of file NativeProcessLinux.cpp.

Function Documentation

◆ DisplayBytes()

static void DisplayBytes ( StreamString s,
void *  bytes,
uint32_t  count 
)
static

Definition at line 136 of file NativeProcessLinux.cpp.

References DEBUG_PTRACE_MAXBYTES, and lldb_private::Stream::Printf().

Referenced by PtraceDisplayBytes().

◆ EnsureFDFlags()

static Status EnsureFDFlags ( int  fd,
int  flags 
)
static

◆ MaybeLogLaunchInfo()

static void MaybeLogLaunchInfo ( const ProcessLaunchInfo info)
static

◆ ProcessVmReadvSupported()

static bool ProcessVmReadvSupported ( )
static

◆ PtraceDisplayBytes()

static void PtraceDisplayBytes ( int &  req,
void *  data,
size_t  data_size 
)
static

Variable Documentation

◆ k_ptrace_word_size

constexpr unsigned k_ptrace_word_size = sizeof(void *)
staticconstexpr