Home | History | Annotate | Download | only in debuggerd

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);
344 tombstone_path = engrave_tombstone(request.pid, request.tid,
374 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
375 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
388 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
389 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
470 static int do_explicit_dump(pid_t tid, bool dump_backtrace) {
471 fprintf(stdout, "Sending request to dump task %d.\n", tid);
475 if (dump_backtrace_to_file(tid, fileno(stdout)) < 0) {
481 if (dump_tombstone(tid, tombstone_path, sizeof(tombstone_path)) < 0) {
491 fputs("Usage: -b [<tid>]\n"
494 "If tid
505 pid_t tid = 0;
510 tid = atoi(argv[i]);
521 return do_explicit_dump(tid, dump_backtrace);