Lines Matching refs:tid

53     pid_t pid, tid;
159 static int get_process_info(pid_t tid, pid_t* out_pid, uid_t* out_uid, uid_t* out_gid) {
161 snprintf(path, sizeof(path), "/proc/%d/status", tid);
196 XLOG("reading tid\n");
205 LOG("timed out reading tid\n");
221 out_request->tid = msg.tid;
227 /* Ensure that the tid reported by the crashing process is valid. */
230 snprintf(buf, sizeof buf, "/proc/%d/task/%d", out_request->pid, out_request->tid);
232 LOG("tid %d does not exist in pid %d. ignoring debug request\n",
233 out_request->tid, out_request->pid);
240 status = get_process_info(out_request->tid, &out_request->pid,
243 LOG("tid %d does not exist. ignoring explicit dump request\n",
244 out_request->tid);
270 XLOG("BOOM: pid=%d uid=%d gid=%d tid=%d\n",
271 request.pid, request.uid, request.gid, request.tid);
284 if (ptrace(PTRACE_ATTACH, request.tid, 0, 0)) {
301 int signal = wait_for_signal(request.tid, &total_sleep_time_usec);
310 tombstone_path = engrave_tombstone(request.pid, request.tid,
315 dump_backtrace(fd, request.pid, request.tid, &detach_failed,
319 status = ptrace(PTRACE_CONT, request.tid, 0, 0);
347 tombstone_path = engrave_tombstone(request.pid, request.tid,
377 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
378 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
391 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
392 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
475 static int do_explicit_dump(pid_t tid, bool dump_backtrace) {
476 fprintf(stdout, "Sending request to dump task %d.\n", tid);
480 if (dump_backtrace_to_file(tid, fileno(stdout)) < 0) {
486 if (dump_tombstone(tid, tombstone_path, sizeof(tombstone_path)) < 0) {
496 fputs("Usage: -b [<tid>]\n"
499 "If tid specified, sends a request to debuggerd to dump that task.\n"
510 pid_t tid = 0;
515 tid = atoi(argv[i]);
526 return do_explicit_dump(tid, dump_backtrace);