Lines Matching refs:request
216 LOG("invalid crash request of size %d\n", status);
232 LOG("tid %d does not exist in pid %d. ignoring debug request\n",
243 LOG("tid %d does not exist. ignoring explicit dump request\n",
254 static bool should_attach_gdb(debugger_request_t* request) {
255 if (request->action == DEBUGGER_ACTION_CRASH) {
259 return debug_uid >= 0 && request->uid <= (uid_t)debug_uid;
267 debugger_request_t request;
268 int status = read_request(fd, &request);
271 request.pid, request.uid, request.gid, request.tid);
273 /* At this point, the thread that made the request is blocked in
284 if (ptrace(PTRACE_ATTACH, request.tid, 0, 0)) {
288 bool attach_gdb = should_attach_gdb(&request);
294 if (request.action == DEBUGGER_ACTION_CRASH) {
301 int signal = wait_for_signal(request.tid, &total_sleep_time_usec);
308 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
310 tombstone_path = engrave_tombstone(request.pid, request.tid,
313 } else if (request.action == DEBUGGER_ACTION_DUMP_BACKTRACE) {
315 dump_backtrace(fd, request.pid, request.tid, &detach_failed,
319 status = ptrace(PTRACE_CONT, request.tid, 0, 0);
341 kill(request.pid, SIGSTOP);
344 tombstone_path = engrave_tombstone(request.pid, request.tid,
358 if (request.action == DEBUGGER_ACTION_DUMP_TOMBSTONE) {
371 kill(request.pid, SIGSTOP);
374 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
375 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
385 wait_for_user_action(request.pid);
388 if (ptrace(PTRACE_DETACH, request.tid, 0, 0)) {
389 LOG("ptrace detach from %d failed: %s\n", request.tid, strerror(errno));
395 kill(request.pid, SIGCONT);
471 fprintf(stdout, "Sending request to dump task %d.\n", tid);
494 "If tid specified, sends a request