| /llvm-project-15.0.7/lldb/tools/debugserver/source/ |
| H A D | DNB.h | 78 nub_bool_t DNBProcessResume(nub_process_t pid, 81 nub_bool_t DNBProcessHalt(nub_process_t pid) DNB_EXPORT; 82 nub_bool_t DNBProcessDetach(nub_process_t pid) DNB_EXPORT; 85 nub_bool_t DNBProcessKill(nub_process_t pid) DNB_EXPORT; 92 nub_addr_t DNBProcessMemoryReadPointer(nub_process_t pid, 94 std::string DNBProcessMemoryReadCString(nub_process_t pid, 103 nub_bool_t DNBProcessMemoryDeallocate(nub_process_t pid, 108 DNBProcessGetProfileData(nub_process_t pid, 121 nub_bool_t DNBProcessSetExitInfo(nub_process_t pid, 130 nub_bool_t DNBProcessSyncThreadState(nub_process_t pid, [all …]
|
| H A D | DNB.cpp | 298 pid); in waitpid_thread() 372 spawn_waitpid_thread(pid); in DNBProcessLaunch() 380 kill(SIGKILL, pid); in DNBProcessLaunch() 396 return pid; in DNBProcessLaunch() 492 pid = in DNBProcessAttach() 500 spawn_waitpid_thread(pid); in DNBProcessAttach() 525 pid = INVALID_NUB_PROCESS; in DNBProcessAttach() 550 return pid; in DNBProcessAttach() 720 nub_process_t pid; in DNBProcessAttachWait() local 723 waitfor_pid = pid; in DNBProcessAttachWait() [all …]
|
| H A D | RNBContext.cpp | 77 void RNBContext::SetProcessID(nub_process_t pid) { in SetProcessID() argument 84 m_pid = pid; in SetProcessID() 86 if (pid != INVALID_NUB_PROCESS) { in SetProcessID() 143 nub_process_t pid = ctx.ProcessID(); in ThreadFunctionProcessStatus() local 146 __FUNCTION__, arg, pid); in ThreadFunctionProcessStatus() 171 pid, in ThreadFunctionProcessStatus() 185 __FUNCTION__, pid); in ThreadFunctionProcessStatus() 192 __FUNCTION__, pid); in ThreadFunctionProcessStatus() 203 __FUNCTION__, pid); in ThreadFunctionProcessStatus() 239 DNBProcessResetEvents(pid, pid_status_event); in ThreadFunctionProcessStatus() [all …]
|
| H A D | debugserver.cpp | 252 g_pid = pid; in RNBRunLoopLaunchInferior() 315 pid = INVALID_NUB_PROCESS; in RNBRunLoopLaunchInferior() 316 g_pid = pid; in RNBRunLoopLaunchInferior() 341 ctx.SetProcessID(pid); in RNBRunLoopLaunchInferior() 347 g_pid = pid; in RNBRunLoopLaunchInferior() 373 g_pid = pid; in RNBRunLoopLaunchAttaching() 381 ctx.SetProcessID(pid); in RNBRunLoopLaunchAttaching() 594 pid); in RNBRunLoopInferiorExecuting() 604 pid); in RNBRunLoopInferiorExecuting() 1543 g_pid = pid; in main() [all …]
|
| H A D | RNBRemote.cpp | 1809 nub_process_t pid; in HandlePacket_qGetPid() local 1816 pid = 0; in HandlePacket_qGetPid() 1817 rep << std::hex << pid; in HandlePacket_qGetPid() 5604 nub_process_t pid; in HandlePacket_jThreadExtendedInfo() local 5611 pid = m_ctx.ProcessID(); in HandlePacket_jThreadExtendedInfo() 5878 nub_process_t pid; in HandlePacket_jGetLoadedDynamicLibrariesInfos() local 5884 pid = m_ctx.ProcessID(); in HandlePacket_jGetLoadedDynamicLibrariesInfos() 5936 nub_process_t pid; in HandlePacket_jGetSharedCacheInfo() local 5942 pid = m_ctx.ProcessID(); in HandlePacket_jGetSharedCacheInfo() 6162 nub_process_t pid; in HandlePacket_qProcessInfo() local [all …]
|
| /llvm-project-15.0.7/lldb/examples/interposing/darwin/fd_interposing/ |
| H A D | FDInterposing.cpp | 323 g_pid = pid; in get_interposed_pid() 449 if (pid >= 0) { in backtrace_error() 529 if (pid >= 0) { in socket$__interposed__() 557 if (pid >= 0) { in socketpair$__interposed__() 582 if (pid >= 0) { in open$__interposed__() 612 if (pid >= 0) { in open$NOCANCEL$__interposed__() 634 if (pid >= 0) { in __open_extended$__interposed__() 655 if (pid >= 0) { in kqueue$__interposed__() 673 if (pid >= 0) { in shm_open$__interposed__() 694 if (pid >= 0) { in accept$__interposed__() [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Linux/ |
| H A D | ptrace.cpp | 26 pid_t pid; in main() local 27 pid = fork(); in main() 28 if (pid == 0) { // child in main() 37 res = ptrace(PTRACE_GETREGS, pid, NULL, ®s); in main() 43 res = ptrace(PTRACE_GETFPREGS, pid, NULL, &fpregs); in main() 54 res = ptrace((enum __ptrace_request)PTRACE_GETREGS, pid, NULL, ®s); in main() 70 res = ptrace((enum __ptrace_request)PTRACE_GETFPREGS, pid, NULL, &fpregs); in main() 76 res = ptrace((enum __ptrace_request)PTRACE_GETVFPREGS, pid, 0, regbuf); in main() 124 res = ptrace(PTRACE_GETSIGINFO, pid, NULL, &siginfo); in main() 126 assert(siginfo.si_pid == pid); in main() [all …]
|
| /llvm-project-15.0.7/lldb/source/Plugins/Process/gdb-remote/ |
| H A D | GDBRemoteCommunicationServerPlatform.cpp | 77 pos->second = pid; in AssociatePortWithProcess() 93 lldb::pid_t pid) { in FreePortForProcess() argument 96 if (pair.second == pid) { in FreePortForProcess() 215 m_spawned_pids.insert(pid); in LaunchGDBServer() 328 if (KillSpawnedProcess(pid)) in Handle_qKillSpawnedProcess() 343 Host::Kill(pid, SIGTERM); in KillSpawnedProcess() 365 Host::Kill(pid, SIGKILL); in KillSpawnedProcess() 520 lldb::pid_t pid) { in DebugserverProcessReaped() argument 523 m_spawned_pids.erase(pid); in DebugserverProcessReaped() 555 m_spawned_pids.insert(pid); in LaunchProcess() [all …]
|
| /llvm-project-15.0.7/lldb/source/Plugins/Trace/intel-pt/ |
| H A D | PerfContextSwitchDecoder.cpp | 77 uint32_t pid, tid; member 92 lldb::pid_t pid; member 148 ThreadContinuousExecution o(cpu_id, tid, pid); in CreateCompleteExecution() 156 lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, in CreateHintedStartExecution() argument 158 ThreadContinuousExecution o(cpu_id, tid, pid); in CreateHintedStartExecution() 168 ThreadContinuousExecution o(cpu_id, tid, pid); in CreateHintedEndExecution() 177 ThreadContinuousExecution o(cpu_id, tid, pid); in CreateOnlyEndExecution() 185 ThreadContinuousExecution o(cpu_id, tid, pid); in CreateOnlyStartExecution() 226 if (current_record.pid == prev.pid && current_record.tid == prev.tid) { in RecoverExecutionsFromConsecutiveRecords() 269 static_cast<lldb::pid_t>(context_switch_record.pid), in DecodePerfContextSwitchTrace() [all …]
|
| H A D | PerfContextSwitchDecoder.h | 67 lldb::pid_t pid, uint64_t start, uint64_t end); 71 lldb::pid_t pid, uint64_t hinted_start, 76 lldb::pid_t pid, uint64_t start, 81 lldb::pid_t pid, 86 lldb::pid_t pid, uint64_t start); 114 lldb::pid_t pid; member 120 lldb::pid_t pid) in ThreadContinuousExecution() 121 : cpu_id(cpu_id), tid(tid), pid(pid) {} in ThreadContinuousExecution()
|
| /llvm-project-15.0.7/lldb/test/API/commands/process/attach/attach_denied/ |
| H A D | main.cpp | 24 bool writePid (const char* file_name, const pid_t pid) in writePid() argument 37 snprintf (buffer, sizeof(buffer), "%ld", (long)pid); in writePid() 69 const pid_t pid = fork (); in main() local 70 if (pid == -1) in main() 76 if (pid > 0) in main() 82 if (ptrace (ATTACH_REQUEST, pid, NULL, 0) == -1) in main() 88 if (writePid (argv[1], pid)) in main() 91 if (ptrace (DETACH_REQUEST, pid, NULL, 0) != 0) in main() 95 kill (pid, SIGTERM); in main() 97 if (waitpid (pid, &status, 0) == -1) in main()
|
| /llvm-project-15.0.7/lldb/source/Host/linux/ |
| H A D | Host.cpp | 154 auto BufferOrError = getProcFile(pid, "cmdline"); in GetProcessArgs() 181 LLDB_LOG(log, "failed to read link exe link for {0}: {1}", pid, in GetExePathAndArch() 198 auto BufferOrError = getProcFile(pid, "environ"); in GetProcessEnviron() 211 static bool GetProcessAndStatInfo(::pid_t pid, in GetProcessAndStatInfo() argument 218 process_info.SetProcessID(pid); in GetProcessAndStatInfo() 220 GetExePathAndArch(pid, process_info); in GetProcessAndStatInfo() 221 GetProcessArgs(pid, process_info); in GetProcessAndStatInfo() 222 GetProcessEnviron(pid, process_info); in GetProcessAndStatInfo() 225 if (!GetStatusInfo(pid, process_info, State, tracerpid, tgid)) in GetProcessAndStatInfo() 246 lldb::pid_t pid = atoi(direntry->d_name); in FindProcessesImpl() local [all …]
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | vfork.c | 10 pid_t pid = vfork(); // expected-warning{{Call to function 'vfork' is insecure}} in f1() local 11 if (pid != 0) in f1() 17 pid = 1; // no-warning in f1() 62 pid_t pid = vfork(); // expected-warning{{Call to function 'vfork' is insecure}} in f2() local 67 pid = 1; // no-warning in f2() 118 pid_t pid; in f4() local 119 if ((pid = vfork()) == 0) // expected-warning{{Call to function 'vfork' is insecure}} in f4()
|
| /llvm-project-15.0.7/lldb/source/Host/common/ |
| H A D | Host.cpp | 99 MonitorChildProcessThreadFunction(::pid_t pid, 106 "<lldb.host.wait4(pid=%" PRIu64 ")>", pid); in StartMonitoringChildProcess() 107 assert(pid <= UINT32_MAX); in StartMonitoringChildProcess() 160 MonitorChildProcessThreadFunction(::pid_t pid, in MonitorChildProcessThreadFunction() argument 163 LLDB_LOG(log, "pid = {0}", pid); in MonitorChildProcessThreadFunction() 194 pid, llvm::sys::StrError()); in MonitorChildProcessThreadFunction() 217 callback(pid, signal, exit_status); in MonitorChildProcessThreadFunction() 360 lldb::pid_t pid = LLDB_INVALID_PROCESS_ID; member 370 shell_info->pid = pid; in MonitorShellCommand() 485 Kill(pid, SIGKILL); in RunShellCommand() [all …]
|
| /llvm-project-15.0.7/lldb/tools/darwin-threads/ |
| H A D | examine-threads.c | 77 const char *get_process_name_for_pid(pid_t pid) { in get_process_name_for_pid() argument 79 if (proc_pidpath(pid, tmp_name, sizeof(tmp_name)) == 0) { in get_process_name_for_pid() 99 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; in get_kinfo_proc_for_pid() 252 int get_proc_threadinfo(pid_t pid, uint64_t thread_handle, in get_proc_threadinfo() argument 266 pid_t pid = 0; in main() local 307 pid = get_pid_for_process_name(procname); in main() 310 pid = (pid_t)strtol(argv[argc - 1], NULL, 10); in main() 311 if (pid == 0 && errno == EINVAL) { in main() 327 printf("pid %d (%s) is currently ", pid, process_name); in main() 360 kr = task_for_pid(mach_task_self(), pid, &task); in main() [all …]
|
| /llvm-project-15.0.7/lldb/test/API/functionalities/postmortem/elf-core/gcore/ |
| H A D | make-core.sh | 27 Core file will be saved as core.<pid>. 41 pid=$! 48 echo "Sleeping for 5 seconds to wait for $pid" 51 echo "Taking core from process $pid" 53 gcore -o core $pid 55 echo "Killing process $pid" 56 kill -9 $pid
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/ios_commands/ |
| H A D | print_crashreport_for_pid.py | 20 assert args.pid, "pid can't be empty" 24 …output_report_with_retries(args.outfile, args.pid.strip(), args.binary_filename, args.retry_count,… 26 def output_report_with_retries(outfile, pid, filename, attempts_remaining, max_wait_time): argument 27 report_name = find_report_in_cur_dir(pid, filename) 37 output_report_with_retries(outfile, pid, filename, attempts_remaining - 1, max_wait_time) 39 raise RuntimeError("Report not found for ({}, {}).".format(filename, pid)) 41 def find_report_in_cur_dir(pid, filename): argument 50 if cur_report_pid == pid:
|
| H A D | get_pid_from_output.py | 12 pid = process_file(args.infile) 13 args.outfile.write(pid) 27 pid = pid_pattern.search(infile.readline()).group(1) 31 assert pid and pid.isdigit() 33 return pid
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Darwin/ |
| H A D | print-stack-trace-in-code-loaded-after-fork.cpp | 31 pid_t pid = fork(); in main() local 32 if (pid != 0) { in main() 37 pid_t child = waitpid(pid, &status, /*options=*/0); in main() 38 assert(pid == child); in main() 43 pid = getpid(); in main() 45 fprintf(stderr, "child: %d\n", pid); in main()
|
| /llvm-project-15.0.7/libc/utils/testutils/ |
| H A D | ExecuteFunctionUnix.cpp | 47 pid_t pid = ::fork(); in invoke_in_subprocess() local 48 if (pid == -1) in invoke_in_subprocess() 51 if (!pid) { in invoke_in_subprocess() 66 ::kill(pid, SIGKILL); in invoke_in_subprocess() 73 pid_t status = ::waitpid(pid, &wstatus, 0); in invoke_in_subprocess() 76 assert(status == pid); in invoke_in_subprocess()
|
| /llvm-project-15.0.7/compiler-rt/include/sanitizer/ |
| H A D | linux_syscall_hooks.h | 89 __sanitizer_syscall_pre_impl_getpgid((long)(pid)) 91 __sanitizer_syscall_post_impl_getpgid(res, (long)(pid)) 96 __sanitizer_syscall_pre_impl_getsid((long)(pid)) 98 __sanitizer_syscall_post_impl_getsid(res, (long)(pid)) 257 res, (long)(pid), (long)(policy), (long)(param)) 276 res, (long)(pid), (long)(len), (long)(user_mask_ptr)) 283 res, (long)(pid), (long)(len), (long)(user_mask_ptr)) 404 __sanitizer_syscall_pre_impl_kill((long)(pid), (long)(sig)) 1703 res, (long)(pid), (long)(head_ptr), (long)(len_ptr)) 2060 void __sanitizer_syscall_pre_impl_getpgid(long pid); [all …]
|
| /llvm-project-15.0.7/lldb/source/Plugins/Platform/Android/ |
| H A D | PlatformAndroidRemoteGDBServer.cpp | 82 bool PlatformAndroidRemoteGDBServer::LaunchGDBServer(lldb::pid_t &pid, in LaunchGDBServer() argument 87 if (!m_gdb_client_up->LaunchGDBServer("127.0.0.1", pid, remote_port, in LaunchGDBServer() 94 MakeConnectURL(pid, remote_port, socket_name.c_str(), connect_url); in LaunchGDBServer() 101 bool PlatformAndroidRemoteGDBServer::KillSpawnedProcess(lldb::pid_t pid) { in KillSpawnedProcess() argument 103 DeleteForwardPort(pid); in KillSpawnedProcess() 104 return m_gdb_client_up->KillSpawnedProcess(pid); in KillSpawnedProcess() 154 void PlatformAndroidRemoteGDBServer::DeleteForwardPort(lldb::pid_t pid) { in DeleteForwardPort() argument 157 auto it = m_port_forwards.find(pid); in DeleteForwardPort() 167 pid, port, m_device_id.c_str(), error.AsCString()); in DeleteForwardPort() 173 const lldb::pid_t pid, const uint16_t remote_port, in MakeConnectURL() argument [all …]
|
| /llvm-project-15.0.7/bolt/test/runtime/X86/ |
| H A D | instrumentation-indirect.c | 18 pid_t pid, wpid; in main() local 21 pid = fork(); in main() 22 if (pid) { in main() 24 kill(pid, SIGUSR1); in main() 26 wpid = waitpid(pid, &wstatus, WNOHANG); in main()
|
| /llvm-project-15.0.7/compiler-rt/test/tsan/ |
| H A D | pthread_atfork_deadlock2.c | 29 pid_t pid = fork(); in main() local 30 if (pid < 0) { in main() 34 if (pid == 0) { in main() 38 if (pid != waitpid(pid, NULL, 0)) { in main()
|
| /llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Posix/ |
| H A D | posix_spawn.c | 31 pid_t pid; in main() local 32 int s = posix_spawn(&pid, argv[0], &file_actions, &attr, args, env); in main() 35 waitpid(pid, &s, WUNTRACED | WCONTINUED); in main() 37 s = posix_spawnp(&pid, argv[0], &file_actions, &attr, args, env); in main() 40 waitpid(pid, &s, WUNTRACED | WCONTINUED); in main()
|